The ultimate Microsoft Fabric, Power BI, Azure AI, and SQL learning event: Join us in Stockholm, September 24-27, 2024.
Save €200 with code MSCUST on top of early bird pricing!
Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
I have a small task that I find hard to accomplish as I always find DAX so difficult. I need to create measure to calculate the cumulative sum of another measure. For example,
The column Cumulative Sum of "Sales Check" is what I am looking for, so I can tell November is the 6th month in the 2009 year that had the cumulative sales greater than $25M. I hope someone can please show me a solution.
Solved! Go to Solution.
hi, @mybarbie9917_LI
try below
sales cumulative =
calculate(
sumx('tablename',[sales check]),
filter(
all('d_date'),
'd_date'[month]<= max('d_date'[month])&&
d_date'[year]=max(d_date'[year])
)
)
hi, @mybarbie9917_LI
try below
sales cumulative =
calculate(
sumx('tablename',[sales check]),
filter(
all('d_date'),
'd_date'[month]<= max('d_date'[month])&&
d_date'[year]=max(d_date'[year])
)
)
HI, @mybarbie9917_LI
if you want to use MEASURE inside sum use sumx() instead of sum()
try below
sales cumulative =
calculate(
sumx('tablename',[sales amount]),
filter(
all('d_date'),
'd_date'[Date]< max('d_date'[Date])
)
)
Thanks for your reply, but it is not exactly what I am looking for. I already have the Sales Cumulative measure. I want to have measure that can do the cumulative sum from the result of the measure Sales Check.
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Check out the August 2024 Power BI update to learn about new features.
User | Count |
---|---|
109 | |
76 | |
65 | |
52 | |
51 |
User | Count |
---|---|
128 | |
117 | |
78 | |
65 | |
63 |