Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
Hi,
I am new to Power BI. I am facing an issue with Running Total in Matrix visual as below mentioned.
When I am using single year as 2016, it will giving correct value.
but once I am using multip years the flow was breaking, as you can see below image
here is the dax expression I am using for this
can someone help where I am doing wrong ?
Thanks for advance
Khalandar.
Solved! Go to Solution.
Hi, I am not sure how your semantic model looks like, but if you are looking for the selected years rank, please check the below picture and the attached pbix file.
I think, please correct me if I am wrong, in each year, the ranking of cities are different. If you want to rank the cities for all selected years, please check the below.
Window DAX function is used in the measure.
WINDOW function (DAX) - DAX | Microsoft Learn
total sales: =
SUM( orders_fact[sales] )
cumulative sales: =
VAR _cumulate =
WINDOW (
1,
ABS,
0,
REL,
ALL ( city_dimension[city] ),
ORDERBY (
CALCULATE (
[total sales:],
ALLSELECTED ( year_dimension[year] )
), DESC
)
)
RETURN
CALCULATE (
[total sales:],
_cumulate
)
If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.
Schedule a short Teams meeting to discuss your question.
Hi, I am not sure how your semantic model looks like, but if you are looking for the selected years rank, please check the below picture and the attached pbix file.
I think, please correct me if I am wrong, in each year, the ranking of cities are different. If you want to rank the cities for all selected years, please check the below.
Window DAX function is used in the measure.
WINDOW function (DAX) - DAX | Microsoft Learn
total sales: =
SUM( orders_fact[sales] )
cumulative sales: =
VAR _cumulate =
WINDOW (
1,
ABS,
0,
REL,
ALL ( city_dimension[city] ),
ORDERBY (
CALCULATE (
[total sales:],
ALLSELECTED ( year_dimension[year] )
), DESC
)
)
RETURN
CALCULATE (
[total sales:],
_cumulate
)
If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.
Schedule a short Teams meeting to discuss your question.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
14 | |
10 | |
10 | |
9 | |
9 |
User | Count |
---|---|
20 | |
13 | |
12 | |
11 | |
8 |