Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

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.

Reply
Anonymous
Not applicable

Creating ad stacked column chart with cumulative value.

Hi all,

 

how do i set up a DAX formula to be able to visualize a table as below with these columns;

 

IDColumn 1:Column 2:
1PlannedPlanned date
2Not planned 
3ActualActual date

 

pbrw35_0-1653422020494.png

 

BR Patrik

 

2 ACCEPTED SOLUTIONS
v-kkf-msft
Community Support
Community Support

Hi @Anonymous ,

 

Does your original data look like this? 

 

vkkfmsft_0-1653639682652.png

 

Then you need to select the ID column, then unpivot other columns.

 

vkkfmsft_1-1653639731272.png

 

Then remove the blank value.

 

vkkfmsft_2-1653639787920.png

vkkfmsft_3-1653639872200.png

 

If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
Best Regards,
Winniz
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

View solution in original post

Hi @Anonymous ,

 

You need to remove the filter from the [a110] column, so try the following measure.

 

running total =
CALCULATE (
    COUNTA ( FRAS[a110] ),
    FILTER (
        ALLSELECTED ( FRAS ),
        ISONORAFTER ( FRAS[assignment_id], MAX ( FRAS[assignment_id] ), DESC )
    )
)

vkkfmsft_0-1655275921991.png

 

Best Regards,
Winniz

View solution in original post

5 REPLIES 5
Anonymous
Not applicable

I dont get it to work! Based on the data in table below, i would like to have the cummulative count, but the forumla only adds cumulative sum on the exact same date. What do i wrong?

 

What I want is to visualize how each row build up over time. (x-axis to show time and y-axis to show cumulative amount of IDs)

 

pbrw35_0-1655274628218.png

 

Hi @Anonymous ,

 

You need to remove the filter from the [a110] column, so try the following measure.

 

running total =
CALCULATE (
    COUNTA ( FRAS[a110] ),
    FILTER (
        ALLSELECTED ( FRAS ),
        ISONORAFTER ( FRAS[assignment_id], MAX ( FRAS[assignment_id] ), DESC )
    )
)

vkkfmsft_0-1655275921991.png

 

Best Regards,
Winniz

Anonymous
Not applicable

Perfect, thanks!

v-kkf-msft
Community Support
Community Support

Hi @Anonymous ,

 

Does your original data look like this? 

 

vkkfmsft_0-1653639682652.png

 

Then you need to select the ID column, then unpivot other columns.

 

vkkfmsft_1-1653639731272.png

 

Then remove the blank value.

 

vkkfmsft_2-1653639787920.png

vkkfmsft_3-1653639872200.png

 

If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
Best Regards,
Winniz
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

EraDon
Frequent Visitor

Hi Patrik,

 

I am not 100% sure about your question. I think this bar chart Y-axis is the count of IDs. Hope this is your fact table and it has repeating IDs for each plan. 
This is the normal cumulative DAX and you have to use the way you do counting IDs.

Cumulative Count IDs =
VAR maxdate = MAX('calendar'[Date])

Return
CALCULATE([countIDs], Filter(All('calendar'[Date]), 'calendar'[Date] <= maxdate))
 

[CountIDs] is the measure you need to get the number of IDs.

Now you can use Stack Chart X-axis is dates, values are [Cumulative Count IDs] and legend is Column 1 (plans type).

 

Regards

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors