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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
FelixZM
New Member

Comparative chart with various dynamic measures to choose from

Hi, All,

 

I need help with the following case that I need to solve (if it is possible).

 

Suppose we have a data table like the following:

 

Company

PlantDateamount saleamount purchasequantity objects
001001Monday, October 17, 20221501301
001   002Sunday, October 16, 2022123552
001 001Sunday, October 16, 202284146
001 003Saturday, October 15, 202269601
002 001Monday, October 17, 20221481351
002  002Sunday, October 16, 202220005040
002 001Sunday, October 16, 202216141
002  003Saturday, October 15, 2022199267

 

I need a chart with the date on the x-axis to be able to add any of the 3 variables (it must be possible to select one or more) which in turn can be compared between companies and plants.

I have tried to create a separate table with the measures that the user can select, but when adding several measures in the graph, I can not include as legend the values of company or plant.

Another option I have tried is to transpose the table, so that the columns with amounts are user selectable and the "value" column as y-axis. In this way, I can make the comparison, but, if I select several variables, it accumulates them (so I cannot compare them).

 

Also, I cannot use the "small multiples" option.

 

Any idea how I can solve this?


Thank you!!

1 ACCEPTED SOLUTION

Finally, I have solved the problem, performing an unpivot of the "Amount Purchase", "Amount Sales" and "Quantity objects" columns.

 

and concatenating the Company, Plant and the new unpivot column to add it in the "Legend" section of the line chart.

 

Thank you!

View solution in original post

4 REPLIES 4
FelixZM
New Member

Hi, @DataInsights,

 

Thank you for your reply! But I have two problems with this:

 

1 - This is a public preview and I can't use it in production enviroments.

2 - I can only use the version 2.97 of Power BI Desktop.

 

Thanks!

@FelixZM,

 

Another option is to create a calculation group, where each calculation item is a measure. Create a slicer using the calculation group, and users will be able to select the measure(s) they want to display. You'll need to install Tabular Editor to create a calculation group.

 

https://www.sqlbi.com/calculation-groups/ 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




DataInsights
Super User
Super User

@FelixZM,

 

You could try a fields parameter. Add each measure to the parameter, and it will create a slicer that allows users to choose which measures to display.

 

https://learn.microsoft.com/en-us/power-bi/create-reports/power-bi-field-parameters 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Finally, I have solved the problem, performing an unpivot of the "Amount Purchase", "Amount Sales" and "Quantity objects" columns.

 

and concatenating the Company, Plant and the new unpivot column to add it in the "Legend" section of the line chart.

 

Thank you!

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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