cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Resolver I
Resolver I

Chart from a gallery or collection from two data sources

Hi all,

 

I want show a Chart that is using diferent sources but all data are together in a Collection.

 

The chart must to show:

 

Categorie (grouped and sorted by it)

MaxHours

MissingHours

 

The problem is that MaxHours is from a plant table and MissingHours is from breakdowns table, but both have the Categorie field.

 

As I said, I have a gallery and collection because I use it to show a report in HTML (this works perfect), but I can't use it to show the Chart:

 

Screenshot_1.pngScreenshot_5.pngScreenshot_4.png

 

any idea?

 

Thanks.

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Resolver I
Resolver I

I did it!!

 

Screenshot_6.png

 

Well, finally I did it using two steps:

 

My original collection is "Equipos" (with all nested records). Know that I have a button to create a new collection "Grafico" using "Equipos":

 

Clear(Grafico);;
ForAll(
           Equipos;
           Collect(
                     Grafico;
                     {Categoria: Categoria.Text;
                     HorasMáximas: HorasMaximas.Text;
                     HorasPerdidas: HorasPerdidas.Text                    
                     }
           )
)

 

Later, the item propetie on the chart is:

 

AddColumns(
    GroupBy(
           Grafico;
        "Categoria"; 		
        "Grupo"			
    );
    "QHM";		
    Sum(
        Grupo;			
        HorasMáximas);				
            "QHP";			
    Sum(
        Grupo;			
        HorasPerdidas)	
    )

 

Maybe is possible do it easier but I don't know... hehehehe.

 

Any way, is here to help.

 

Now I have a new task to do it with the chart. But I will open a new topic.

 

Thank you to read.

View solution in original post

1 REPLY 1
Highlighted
Resolver I
Resolver I

I did it!!

 

Screenshot_6.png

 

Well, finally I did it using two steps:

 

My original collection is "Equipos" (with all nested records). Know that I have a button to create a new collection "Grafico" using "Equipos":

 

Clear(Grafico);;
ForAll(
           Equipos;
           Collect(
                     Grafico;
                     {Categoria: Categoria.Text;
                     HorasMáximas: HorasMaximas.Text;
                     HorasPerdidas: HorasPerdidas.Text                    
                     }
           )
)

 

Later, the item propetie on the chart is:

 

AddColumns(
    GroupBy(
           Grafico;
        "Categoria"; 		
        "Grupo"			
    );
    "QHM";		
    Sum(
        Grupo;			
        HorasMáximas);				
            "QHP";			
    Sum(
        Grupo;			
        HorasPerdidas)	
    )

 

Maybe is possible do it easier but I don't know... hehehehe.

 

Any way, is here to help.

 

Now I have a new task to do it with the chart. But I will open a new topic.

 

Thank you to read.

View solution in original post

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Community Highlights

Community Highlights

Check out the Power Platform Community Highlights

Top Solution Authors
Top Kudoed Authors
Users online (13,332)