Microsoft is giving away 50,000 FREE Microsoft Certification exam vouchers. Get Fabric certified for FREE! Learn more
Hi all
I have a table for ticket purchases that looks like this...
Ticket sales for 2023 start on a different date than in 2024. In order to do a comparison, I've added week numbers for each year starting at the first date tickets were sold (formatted as dd/mm/yyyy). I need to be able to plot cumulative totals on a graph like below but haven't been successul in making it work. Could someone please help me create a measure that will do this? Thanks
Solved! Go to Solution.
You can use the following DAX measure to get the desired result:
Cumulative Count =
COUNTROWS (
FILTER (
ALL ( 'Table' ),
'Table'[Week] <= MAX ( 'Table'[Week] )
&& 'Table'[Year] = MAX ( 'Table'[Year] )
)
)
I have created the "Year" calculated column using the following DAX formula:
Year = YEAR('Table'[date])
Here is the solution screenshot in Power BI:
Best Regards,
Udit
If this post helps, please consider Accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudo 👍
🚀 Let's Connect: LinkedIn || YouTube || Medium || GitHub
✨ Visit My Linktree: LinkTree
Thanks quantumudit, that worked perfectly! I appreciate your help with this 🙂
You can use the following DAX measure to get the desired result:
Cumulative Count =
COUNTROWS (
FILTER (
ALL ( 'Table' ),
'Table'[Week] <= MAX ( 'Table'[Week] )
&& 'Table'[Year] = MAX ( 'Table'[Year] )
)
)
I have created the "Year" calculated column using the following DAX formula:
Year = YEAR('Table'[date])
Here is the solution screenshot in Power BI:
Best Regards,
Udit
If this post helps, please consider Accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudo 👍
🚀 Let's Connect: LinkedIn || YouTube || Medium || GitHub
✨ Visit My Linktree: LinkTree
Check out the April 2025 Power BI update to learn about new features.
Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.
User | Count |
---|---|
19 | |
12 | |
10 | |
10 | |
8 |
User | Count |
---|---|
20 | |
13 | |
8 | |
7 | |
6 |