Forum Discussion
Dynamic calculate Measure value based on Slicer Selection
Hi everyone!
I hope, that you can help me, because I'm new in power bi world))))
I need to create a table, where I can add measures by choosing atributes in slicer and compare theese measure, for example YoY (see pic below - "Volume" is chosen by filter in slicer) .
I managed to create table based on dynamically calsulated measures and slicer selection (the example is described here - https://community.powerbi.com/t5/Desktop/Changing-column-graph-displayed-value/m-p/108427/highlight/true#M45588).
Unfortunately, I'm not succed in comparing measures (YoY %).
Can someone help me, plese?
Hi oksana,
Slicer can't be used to control columns, I would recommend you to use bookmark instead: https://docs.microsoft.com/en-us/power-bi/desktop-bookmarks.
Regards,
Jimmy Tao
4 Replies
- v-yuta-msftCommunity Support
Hi oksana,
As a general solution, maybe you can try measure below and check if it can meet your requirement:
YoY% = VAR value_A = CALCULATE ( MAX ( table[value] ), FILTER ( table, table[year] = 2017 ) ) VAR value_B = CALCULATE ( MAX ( table[value] ), FILTER ( table, table[year] = 2018 ) ) RETURN CALCULATE ( ( value_B - value_A ) / value_A, ALLSELECTED ( table[Product] ) )In addtion, if you have other issues, could you share some sample data and share more details about your logic and expected results?
Regards,
Jimmy Tao
- Greg_DecklerCommunity Champion
See if my Time Intelligence the Hard Way provides a different way of accomplishing what you are going for.
https://community.powerbi.com/t5/Quick-Measures-Gallery/Time-Intelligence-quot-The-Hard-Way-quot-TITHW/m-p/434008 - AnonymousNot applicable
v-yuta-msft and Greg_Deckler,
thank you very much for you advices! I will use them for sure.
But unfortunately, I can not solve my task.
I have attached more details, hoping on your help :)
I have table with columns Product, NetSales, Volume and Year. I need filters,that will help User to choose what type of measure he wants to see in table/chart. I managed to do filters, but I do not know how to make filter, pushing on which (it will appear new column) i can see comparisson of two years in percentage (YoY).
Do you have any idea?
- v-yuta-msftCommunity Support
Hi oksana,
Slicer can't be used to control columns, I would recommend you to use bookmark instead: https://docs.microsoft.com/en-us/power-bi/desktop-bookmarks.
Regards,
Jimmy Tao