Forum Discussion
Variable Tables in Measures
Hello, another question for today:
(CY in the last row is a typo that has since been corrected.)
I have made a measure alongside a measure table that allows me to filter my sheet by a selected measure, of which I have seven.
However, in the interest of keeping this entire report to one page, I also want the ability to select a specific date range to compare against. To make the measures easy, I created six tables, three of which are compared against the other three from the year, week, or day prior:
My goal here is to have another metric switcher, for Day, Week, and Year. I thought the easiest way to do this was to have parameters within the original measure to change the "LY" to "LD" or "LW" to access the respective metrics from each date range, with the ability to select the date range as I would select my metrics in the filter I have already built.
If there is a way to do this, or an easier way to get to my end result, any help is appreciated!
- Anonymous4 years ago
Hi paybacksilver ,
You can refer the following links to get it:
Dynamic Selection of Measures in Power BI
1. Create a measure dimension table as below
2. Create different measures base on different period(CD,CW,CY, LD,LW and LY etc.) calculation logic
Invoiced Amount = IF(CONTAINS('Measures 1','Measures 1'[Measure], "Invoiced Amount"), SUM(KPI_BBB_FACT[INVOICED_AMOUNT]), BLANK())
Discount Amount = IF(CONTAINS('Measures 1','Measures 1'[Measure], "Discount Amount"), SUM(KPI_BBB_FACT[DISCOUNT_AMOUNT]), BLANK())
Cancel Amount = IF(CONTAINS('Measures 1','Measures 1'[Measure], "Cancel Amount"), SUM(KPI_BBB_FACT[CANCEL_AMOUNT]), BLANK())
CREATING DYNAMIC MEASURES FOR POWER BI VISUALIZATIONS
Change time period (week, Month, Quarter...) on slicer selection
Best Regards
1 Reply
- AnonymousNot applicable
Hi paybacksilver ,
You can refer the following links to get it:
Dynamic Selection of Measures in Power BI
1. Create a measure dimension table as below
2. Create different measures base on different period(CD,CW,CY, LD,LW and LY etc.) calculation logic
Invoiced Amount = IF(CONTAINS('Measures 1','Measures 1'[Measure], "Invoiced Amount"), SUM(KPI_BBB_FACT[INVOICED_AMOUNT]), BLANK())
Discount Amount = IF(CONTAINS('Measures 1','Measures 1'[Measure], "Discount Amount"), SUM(KPI_BBB_FACT[DISCOUNT_AMOUNT]), BLANK())
Cancel Amount = IF(CONTAINS('Measures 1','Measures 1'[Measure], "Cancel Amount"), SUM(KPI_BBB_FACT[CANCEL_AMOUNT]), BLANK())
CREATING DYNAMIC MEASURES FOR POWER BI VISUALIZATIONS
Change time period (week, Month, Quarter...) on slicer selection
Best Regards