Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
hamzahad91
Helper I
Helper I

Show graph corresponding to the list item choosen

Capture.PNG

 

I have a list of items , every item have his graph in a different page, I would show the graph according to the item choosen . How is it possible to make ?

1 ACCEPTED SOLUTION

@hamzahad91,

 

How many items in your list? If you have only few items, this can be down by a measure. Please refer to the link below to see the details.

  1. Merge tables.
    Edit table>Merge Queries
    Capture.PNG
  2. Rename your colums' name
    T1Quantity,T1Objectif, T2Quantity, T2Objectif.....
  3. Create a slicer table
    Capture2.PNG
  4. Create two measure in your table.
    c=
    var selectitem = MIN(SlicerTable[Table])
    return if(selectitem="Table1",SUM(Table1[T1Objectif]),SUM(Table1[T2Objectif]))
    SelectedQuantity =
    var selectitem = MIN(SlicerTable[Table])
    return if(selectitem="Table1",SUM(Table1[T1Quanitity]),SUM(Table1[T2Quantity]))
  5. Create a visual, use SelectedQuantity in column, and use SelectedQuantity in line.

Result.

Capture3.PNGCapture4.PNG

 

Regards,

Charlie Liao

View solution in original post

6 REPLIES 6
anupampandey
Helper III
Helper III

Hi,

 

Could you share some sample data please?

 

Thanks,

Anupam

sample1.PNG

 

Here are the values

sample2.PNG

 

Here I have a slicer containing the 2 tables name. I woud that when I select Table1 it shows me the according graph ( in table1 page ) and samething when I click on table2

 

@hamzahad91,

 

How many items in your list? If you have only few items, this can be down by a measure. Please refer to the link below to see the details.

  1. Merge tables.
    Edit table>Merge Queries
    Capture.PNG
  2. Rename your colums' name
    T1Quantity,T1Objectif, T2Quantity, T2Objectif.....
  3. Create a slicer table
    Capture2.PNG
  4. Create two measure in your table.
    c=
    var selectitem = MIN(SlicerTable[Table])
    return if(selectitem="Table1",SUM(Table1[T1Objectif]),SUM(Table1[T2Objectif]))
    SelectedQuantity =
    var selectitem = MIN(SlicerTable[Table])
    return if(selectitem="Table1",SUM(Table1[T1Quanitity]),SUM(Table1[T2Quantity]))
  5. Create a visual, use SelectedQuantity in column, and use SelectedQuantity in line.

Result.

Capture3.PNGCapture4.PNG

 

Regards,

Charlie Liao

Thank you @v-caliao-msft , I have 10 visual to make (Is your exemple still working ?

I have some questions :

Why table 2 columns are copied in table1 ? should I Keep Table 2 ?

Can you explain me the 2 lines of code ?

@hamzahad91,

 

I have 10 visual to make (Is your exemple still working ?
Yes, you need to merge those columns from different tables into one table.

Why table 2 columns are copied in table1 ? should I Keep Table 2 ?

In order to create the maesures conveniently.

Can you explain me the 2 lines of code ?

Which code do you need?

 

Regards,

Charlie Liao

The measures .

And now that I have to add 10 items , how can I change the measures so it fits the new entities ?

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.