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.
hello,
I have a slicer where I can choose only one specific date, I need to create measure which calculates for me values for the whole month, quater and year period for table where I have data for the whole year of 2019 i.e. when I choose 19th febuary in slicer I should get below results:
MonthMeasure : total sum for whole january & febuary
QuaterMeasure : total sum for january, febuary & march
YearMeasure: total sum for whole year of 2019
any ideas?
regards
Solved! Go to Solution.
Hi @Anonymous ,
Based on my test, you could refer to below steps:
Sample data(Quarter is a calculated column: Quarter = [Date].[Quarter]):
Create below measure:
Month Measure = CALCULATE(SUM(Table1[Value]),FILTER(ALL(Table1),MONTH('Table1'[Date])=MONTH(SELECTEDVALUE('Table1'[Date]))))
Quarter Measure = CALCULATE(SUM(Table1[Value]),FILTER(ALL(Table1),'Table1'[Quarter]=SELECTEDVALUE(Table1[Quarter])))
Year Measure = CALCULATE(SUM(Table1[Value]),FILTER(ALL(Table1),YEAR('Table1'[Date]=YEAR(SELECTEDVALUE(Table1[Date])))))
Result:
You could also download the pbix file to have a view.
Regards,
Daniel He
Hi @Anonymous ,
Based on my test, you could refer to below steps:
Sample data(Quarter is a calculated column: Quarter = [Date].[Quarter]):
Create below measure:
Month Measure = CALCULATE(SUM(Table1[Value]),FILTER(ALL(Table1),MONTH('Table1'[Date])=MONTH(SELECTEDVALUE('Table1'[Date]))))
Quarter Measure = CALCULATE(SUM(Table1[Value]),FILTER(ALL(Table1),'Table1'[Quarter]=SELECTEDVALUE(Table1[Quarter])))
Year Measure = CALCULATE(SUM(Table1[Value]),FILTER(ALL(Table1),YEAR('Table1'[Date]=YEAR(SELECTEDVALUE(Table1[Date])))))
Result:
You could also download the pbix file to have a view.
Regards,
Daniel He
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 |
---|---|
115 | |
101 | |
72 | |
68 | |
45 |
User | Count |
---|---|
145 | |
106 | |
105 | |
90 | |
65 |