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.
Hi,
Let's say that I am building a financial dashboard for the organization and I want to present the comparison of current value with different time period.
For example, I am calculating IT cost using formula (X):
Hi @vranjan22,
You need an extra table that lists all available time periods (Previous Month, Previous Quarter, Previous Year (YTD), etc.), to allow users to choose from. This table should be unrelated to any other data table. Then, you need to create five separate measures to return result for each period, suppose they are [Previous Month Cost], [Previous Quarter Cost], [Previous Year (YTD) Cost], etc. To dynamic select Y, you need below measure:
Selected Measure = VAR MySelection = SELECTEDVALUE ( 'Measure Selection'[Measure Name], "Sales" ) RETURN SWITCH ( TRUE (), MySelection = "Previous Month", [Previous Month Cost], MySelection = "Previous Quarter", [Previous Quarter Cost], MySelection = "Previous Year (YTD)", [Previous Year (YTD) Cost], BLANK () )
Here is a blog for your reference: Power BI – Using a Slicer to show different measures
Best regards,
Yuliana Gu
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
107 | |
93 | |
77 | |
65 | |
53 |
User | Count |
---|---|
147 | |
106 | |
104 | |
87 | |
61 |