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.
I want to get the running total or cummulative total in the "KUM_LY_AE" column like in "KUM_AE" column but only getting summarized data. This the dax query I am using :
I have 2020 data and current year data in different tables and connected these tables with a calendar table.
Please help.
Solved! Go to Solution.
Hi @newbie9292 ,
Please use the following measure:
KUM_LY_AE = CALCULATE (SUM(AE_2020[AuftrEing]),FILTER (ALLSELECTED(Date_dim[Date]),Date_dim[Date] <= MAX (Date_dim[Date])&&MONTH(Date_dim[Date])<=MONTH(MAX (Date_dim[Date]))))
It works well based on my test data.
You can also refer to my test pbix.
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Best Regards,
Dedmon Dai
Hi @newbie9292 ,
Please use the following measure:
KUM_LY_AE = CALCULATE (SUM(AE_2020[AuftrEing]),FILTER (ALLSELECTED(Date_dim[Date]),Date_dim[Date] <= MAX (Date_dim[Date])&&MONTH(Date_dim[Date])<=MONTH(MAX (Date_dim[Date]))))
It works well based on my test data.
You can also refer to my test pbix.
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Best Regards,
Dedmon Dai
Hi @newbie9292
This column here, from which Table is it added to the visual?
And how the Dim_Date and AE_2020 tables are connected?
Regards
Amine Jerbi
If I answered your question, please mark this thread as accepted
and you can follow me on
My Website, LinkedIn and Facebook
Hello Amine,
Thanks for your reply.
This is how my model looks like :
This is how the tables are connected :
You need to set the data type for you date column in the fact tables to "date". It looks like they are set to type "whole number".
also make sure the fields in your visuals and slicer all come from the date table.
Proud to be a Super User!
Paul on Linkedin.
Hello @PaulDBrown ,
Thanks for your reply. Yes the columns are in date format now and the slicers are coming from the date table but still the issue remains.
Hi @newbie9292
Can I see how you formated the Date column in AE_2020?
Also please Copy paste the visual into another page and show us.
Regards
Amine Jerbi
If I answered your question, please mark this thread as accepted
and you can follow me on
My Website, LinkedIn and Facebook
Hello @aj1973 ,
This how my formatted date column looks like:
This is the visual :
When I select 2020 in the slicer, the cummulated value is shown correctly :
But when I select 2020 and 2021 in the slicer, it messes up the cummulated data for 2020 only :
you need to add the year field from your date table to the visuals and then drill down to month level
Proud to be a Super User!
Paul on Linkedin.
Well that's normal because the column Month Name is cumulating the sum for January 2020 and January 2021 (it's an example), meaning your formula is not calculating it right upon the filters.
Maybe use Month Name_Year should solve the issue
Regards
Amine Jerbi
If I answered your question, please mark this thread as accepted
and you can follow me on
My Website, LinkedIn and Facebook
So shall I create a new column with month name and year like Month_name + Year in the date table?
Yes,
Do the test if you want by replacing the column Month name by column Date in the Matrix, and then Use date hierarchy to only select Month and Year into your Matrix
Regards
Amine Jerbi
If I answered your question, please mark this thread as accepted
and you can follow me on
My Website, LinkedIn and Facebook
I don't see a date heirarchy in the date table :
It looks like you date column is not formated. It should look like this
Or add Date to rows and then delete Quarter and Day
Or add a new field MMM-YY, if it's easier for you.
Regards
Amine Jerbi
If I answered your question, please mark this thread as accepted
and you can follow me on
My Website, LinkedIn and Facebook
It looks like this :
Do I need to change the DAX query :
Why? what's wrong with what you see?
Regards
Amine Jerbi
If I answered your question, please mark this thread as accepted
and you can follow me on
My Website, LinkedIn and Facebook
This my expected output :
The only part wrong in this one is the KUM_LY_AE which should show the cummulative data per month.
I am using this DAX query to calculate the cummulative or running total for the year 2020 :
Hey @newbie9292
Try something like this
Regards
Amine Jerbi
If I answered your question, please mark this thread as accepted
and you can follow me on
My Website, LinkedIn and Facebook
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 |
---|---|
107 | |
97 | |
75 | |
65 | |
53 |
User | Count |
---|---|
144 | |
103 | |
98 | |
85 | |
64 |