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 Power BI Users,
I am having an issue with Cumulative Count by week. Here is the sample data i am working on :
This shows the tickets opened on a date and its corresponding week_number.
We want to plot the data on the weeknum level with Cumulative count like this :
Any help would be deeply appreciated.
Thanks,
@Greg_Deckler @mahoneypat @edhans
Solved! Go to Solution.
@DeepakJha23 - You could create a measure like this:
Cumulative Count =
VAR __Week = MAX('Table'[Week_Num(Date)])
RETURN
SUMX(FILTER('Table',[Week_Num(Date)]<=__Week),[TicketCount])
Hello @DeepakJha23
here's my solution. It is very closed to @Greg_Deckler solution:
Sum of Ticket Count = SUM('Table'[Ticket Count])
Cumulative Count =
CALCULATE(
[Sum of Ticket Count],
FILTER(
ALL('Table'),
'Table'[Week_Num(Date)] <= MAX('Table'[Week_Num(Date)])
)
)
With kind greetings from the city where the legend of the 'Pied Piper de Hamelin' is at home
FrankAT (Proud to be a Datanaut)
Hello @DeepakJha23
here's my solution. It is very closed to @Greg_Deckler solution:
Sum of Ticket Count = SUM('Table'[Ticket Count])
Cumulative Count =
CALCULATE(
[Sum of Ticket Count],
FILTER(
ALL('Table'),
'Table'[Week_Num(Date)] <= MAX('Table'[Week_Num(Date)])
)
)
With kind greetings from the city where the legend of the 'Pied Piper de Hamelin' is at home
FrankAT (Proud to be a Datanaut)
@DeepakJha23 , as you have date you can use a date calendar and measure like this (You can have week table with week date)
. Make sure week is taken from week table
example
Cumm Sales = CALCULATE(SUM(Sales[Sales Amount]),filter(date,date[date] <=maxx(date,date[date])))
Cumm Sales = CALCULATE(SUM(Sales[Sales Amount]),filter(date,date[date] <=max(Sales[Sales Date])))
Cumm Sales = CALCULATE(SUM(Sales[Sales Amount]),filter(Week,Week[Week] <=maxx(Week,Week[Week])))
Cumm Sales = CALCULATE(SUM(Sales[Sales Amount]),filter(allselected(Week),Week[Week] <=maxx(Week,Week[Week])))
also refer
https://medium.com/@amitchandak.1978/power-bi-wtd-questions-time-intelligence-4-5-98c30fab69d3
https://community.powerbi.com/t5/Community-Blog/Week-Is-Not-So-Weak-WTD-Last-WTD-and-This-Week-vs-La...
To get the best of the time intelligence function. Make sure you have a date calendar and it has been marked as the date in model view. Also, join it with the date column of your fact/s. Refer :
https://radacad.com/creating-calendar-table-in-power-bi-using-dax-functions
https://www.archerpoint.com/blog/Posts/creating-date-table-power-bi
https://www.sqlbi.com/articles/creating-a-simple-date-table-in-dax/
See if my webinar on Time Intelligence can help: https://community.powerbi.com/t5/Webinars-and-Video-Gallery/PowerBI-Time-Intelligence-Calendar-WTD-Y...
Appreciate your Kudos.
@DeepakJha23 - You could create a measure like this:
Cumulative Count =
VAR __Week = MAX('Table'[Week_Num(Date)])
RETURN
SUMX(FILTER('Table',[Week_Num(Date)]<=__Week),[TicketCount])
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 |
---|---|
110 | |
99 | |
80 | |
64 | |
57 |
User | Count |
---|---|
145 | |
110 | |
91 | |
84 | |
66 |