Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Hey,
I am relatively new to powerbi.
Is there a way i can show a table of data filtered by month, but only showing a specific month and year to date total. When I filter my table to current month, the total is also showing current month's data.
Solved! Go to Solution.
Hi @alwpaul ,
You want to show the year-to-date values in the total, and only the selected month's value in the month.
I have a doubt whether the year to date ends on the selected month, or on the current date.
Below are the results for the year to the selected month.
Measure = var _total=TOTALYTD(SUM('Table'[Value]),'CALENDAR'[Date])
return IF(ISINSCOPE('CALENDAR'[Month]),SUM('Table'[Value]),_total)
Below are the results for the year to the current date(today).
Measure2 = var _total=CALCULATE(SUM('Table'[Value]),FILTER(ALL('CALENDAR'),YEAR([Date])=YEAR(TODAY())&&[Date]<=TODAY()))
return IF(ISINSCOPE('CALENDAR'[Month]),SUM('Table'[Value]),_total)
You can check more details from my attachment.
Best Regards,
Stephen Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @alwpaul ,
You want to show the year-to-date values in the total, and only the selected month's value in the month.
I have a doubt whether the year to date ends on the selected month, or on the current date.
Below are the results for the year to the selected month.
Measure = var _total=TOTALYTD(SUM('Table'[Value]),'CALENDAR'[Date])
return IF(ISINSCOPE('CALENDAR'[Month]),SUM('Table'[Value]),_total)
Below are the results for the year to the current date(today).
Measure2 = var _total=CALCULATE(SUM('Table'[Value]),FILTER(ALL('CALENDAR'),YEAR([Date])=YEAR(TODAY())&&[Date]<=TODAY()))
return IF(ISINSCOPE('CALENDAR'[Month]),SUM('Table'[Value]),_total)
You can check more details from my attachment.
Best Regards,
Stephen Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
User | Count |
---|---|
98 | |
90 | |
83 | |
69 | |
67 |
User | Count |
---|---|
113 | |
104 | |
101 | |
73 | |
65 |