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.
Hello
I'm totally new to Power BI. I have a problem with calculating running totals.
This is a view of my data:
I have tried a lot of dax-expressions and this expression works for 1 year (i use a filter on start_year)
But now I want a matrix with the categories and years in (so no filter on year) and this is the result. I tried different dax expressions with ALL, ALLSELECTED, MAX, EARLIER,... but i can't find the solution.
I have also made a new table (summarize) and tried it with this table but non of the expressions is working.
New Table:
Anyone who can help me?
Solved! Go to Solution.
Hi,
Could you please try something like below whether it suits your requirement?
running total =
CALCULATE (
SUM ( 'Blad1'[Count] );
FILTER (
ALLSELECTED ( 'Blad1' );
'Blad1'[catnr] <= SELECTEDVALUE ( 'Blad1'[catnr] )
&& 'Blad1'[Start_year] = MAX ( 'Blad1'[Start_year] )
)
)
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 if I understood your question correctly, but please check the attached file.
I fixed two measures.
Thank you.
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 try now to calculate the percentage of the running total. The DAX expression works again if I filter the data but not without filter on years.
DAX expression:
Result with filter:
Result without filter:
I tried different expressions but I only get errors :-(.
Hi,
I am not sure if I understood your question correctly, but please check the attached file.
I fixed two measures.
Thank you.
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,
Please share your sample pbix file's link, and then I will try to look into it.
Thank you.
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,
Could you please try something like below whether it suits your requirement?
running total =
CALCULATE (
SUM ( 'Blad1'[Count] );
FILTER (
ALLSELECTED ( 'Blad1' );
'Blad1'[catnr] <= SELECTEDVALUE ( 'Blad1'[catnr] )
&& 'Blad1'[Start_year] = MAX ( 'Blad1'[Start_year] )
)
)
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
User | Count |
---|---|
82 | |
72 | |
67 | |
47 | |
36 |
User | Count |
---|---|
111 | |
56 | |
50 | |
42 | |
40 |