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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
Anonymous
Not applicable

Manipulating a waterfall chart with categorical data on the x-axis

Hi

 

I have a challenge regarding a waterfall chart. 

 

The visual shows four categories that are summed within four subsums, to make a build down waterfall:

mdhor_0-1592994505978.png

 

The data is created in a calculated table and looks like this:

ValueCategorySubsumOrder

10Cat1Subsum11
10Cat1Subsum21
-5Cat2Subsum22
10Cat1Subsum31
-5Cat2Subsum32
-1Cat3Subsum33
10Cat1Subsum41
-5Cat2Subsum42
-1Cat3Subsum43
-1Cat4Subsum44

 

I have three questions:

1) Is there a smarter way of making the calculated table to make the visual build down correctly? E.g. so that values of Cat1 doesn't have to be in Subsum2, Subsum3 and Subsum4 because Cat1 is already included in Subsum1?

2) How can I hide the empty values in the visual? If Cat2 is not showed in Subsum1, it should not be visible in the waterfall.

3) How do I make the visual sort correctly, so that the order on the x-axis is Subsum1 -> Cat1 -> Cat2 -> Cat3 -> Cat4 -> Subsum2 -> Cat1 -> etc.?

 

Thank you very much

Best regards

Mattias

 

1 ACCEPTED SOLUTION
Icey
Community Support
Community Support

Hi @Anonymous ,

 

Based on my test, the default waterfall visual which Power BI Desktop provided can't achieve your requirements.

 

Please try to use custom visual: Waterfall Chart - xViz.

waterfall2.PNG

 

Create a measure like below and then put it into "Filters on this visual". Then, you'll get what you want.

Measure = 
VAR Count_ =
    CALCULATE (
        COUNT ( 'Table'[Category] ),
        FILTER (
            ALLSELECTED ( 'Table' ),
            'Table'[Category] = MAX ( 'Table'[Category] )
                && 'Table'[Subsum] <= MAX ( 'Table'[Subsum] )
        )
    )
RETURN
    IF ( Count_ = 1, 1 )

waterfall.PNG

 

BTW, .pbix file attached.

 

 

Best Regards,

Icey

 

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

1 REPLY 1
Icey
Community Support
Community Support

Hi @Anonymous ,

 

Based on my test, the default waterfall visual which Power BI Desktop provided can't achieve your requirements.

 

Please try to use custom visual: Waterfall Chart - xViz.

waterfall2.PNG

 

Create a measure like below and then put it into "Filters on this visual". Then, you'll get what you want.

Measure = 
VAR Count_ =
    CALCULATE (
        COUNT ( 'Table'[Category] ),
        FILTER (
            ALLSELECTED ( 'Table' ),
            'Table'[Category] = MAX ( 'Table'[Category] )
                && 'Table'[Subsum] <= MAX ( 'Table'[Subsum] )
        )
    )
RETURN
    IF ( Count_ = 1, 1 )

waterfall.PNG

 

BTW, .pbix file attached.

 

 

Best Regards,

Icey

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Sept PBI Carousel

Power BI Monthly Update - September 2024

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

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

Sept NL Carousel

Fabric Community Update - September 2024

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

Top Solution Authors
Top Kudoed Authors