Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

Cannot create measure for waterfall chart

Hello, 

I have the following table:

 

Order NoCityStateCustomer TypeEffect NameEffect ValueIncomeOrder QuantityEffect Name & Customer Type
5014-1MelbourneVICHome OfficeEffect A52100235Home Office Effect A
5016-1MelbourneVICHome OfficeEffect A202980228Home Office Effect A
5018-1SydneyNSWCorporateEffect A101667190Corporate Effect A
5019-1MelbourneVICHome OfficeEffect A182109308Home Office Effect A
5020-1SydneyNSWConsumerEffect A12624330Consumer Effect A
5023-1MelbourneVICHome OfficeEffect A52194281Home Office Effect A
5024-1SydneyNSWCorporateEffect A141732174Corporate Effect A
5025-1SydneyNSWConsumerEffect A112039276Consumer Effect A
5027-1SydneyNSWSmall BusinessEffect A102685400Small Business Effect A
5029-1SydneyNSWCorporateEffect A42318350Corporate Effect A
5031-1MelbourneVICCorporateEffect A111514234Corporate Effect A
5033-1SydneyNSWCorporateEffect A52992233Corporate Effect A
5034-1SydneyNSWCorporateEffect A51865366Corporate Effect A
5036-1MelbourneVICCorporateEffect A21465247Corporate Effect A
5037-1SydneyNSWHome OfficeEffect A31726400Home Office Effect A
5038-1MelbourneVICCorporateEffect A62056287Corporate Effect A
5039-1SydneyNSWCorporateEffect A21553276Corporate Effect A
5040-1SydneyNSWSmall BusinessEffect A52360268Small Business Effect A
5043-1SydneyNSWSmall BusinessEffect A141315249Small Business Effect A
5014-1MelbourneVICHome OfficeEffect B132100235Home Office Effect B
5016-1MelbourneVICHome OfficeEffect B112980228Home Office Effect B
5018-1SydneyNSWCorporateEffect B101667190Corporate Effect B
5019-1MelbourneVICHome OfficeEffect B142109308Home Office Effect B
5020-1SydneyNSWConsumerEffect B122624330Consumer Effect B
5023-1MelbourneVICHome OfficeEffect B142194281Home Office Effect B
5024-1SydneyNSWCorporateEffect B31732174Corporate Effect B
5025-1SydneyNSWConsumerEffect B12039276Consumer Effect B
5027-1SydneyNSWSmall BusinessEffect B62685400Small Business Effect B
5029-1SydneyNSWCorporateEffect B192318350Corporate Effect B
5031-1MelbourneVICCorporateEffect B31514234Corporate Effect B
5033-1SydneyNSWCorporateEffect B92992233Corporate Effect B
5034-1SydneyNSWCorporateEffect B181865366Corporate Effect B
5036-1MelbourneVICCorporateEffect B71465247Corporate Effect B
5037-1SydneyNSWHome OfficeEffect B181726400Home Office Effect B
5038-1MelbourneVICCorporateEffect B142056287Corporate Effect B
5039-1SydneyNSWCorporateEffect B21553276Corporate Effect B
5040-1SydneyNSWSmall BusinessEffect B62360268Small Business Effect B
5043-1SydneyNSWSmall BusinessEffect B131315249Small Business Effect B

 

I need to create a waterfall chart based on this table, which also has different filters (in this example it is only one filter):

  • And it changes to this if it is filtered:

 

The problem is:

  • I need to calculate the price ( dividing Income with Order Quantity ) based on the filters that are selected.
    • I have 3 measures for this, one is the sum of Income, second is the sum of Order Quantity and third is the division between Income measure and Quantity Measure.
  • This price needs to be in the starting point of the waterfall chart.

Using the measure of Price is very simple, but I can't seem to grasp how to include that measure (that is calculated again based on the filters that are selected) in the starting point of the waterfall chart.

 

The desired outcome would be something like this:

  • With the difference that price is the starting point and with a different colour.

 

Any suggestion would be deeply appreciated,

Thanks.

 

  • Hi Anonymous ,

     

    You can create the following measure and then use the Ultimate Waterfall visual.

    Price = 
    SUMX ( ALLSELECTED ( 'Table' ), 'Table'[Income] )
        / SUMX ( ALLSELECTED ( 'Table' ), 'Table'[Order Quantity] )

     

    Or use the following measures and Simple Waterfall visual.

     

    Price_Measure = 
    DIVIDE (
        [Price],
        CALCULATE (
            DISTINCTCOUNT ( 'Table'[Effect Name & Customer Type] ),
            ALLSELECTED ( 'Table' )
        )
    )
    Effect Value_Measure = SUM ( 'Table'[Effect Value] ) + [Price_Measure]

     

     

    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.

     

     

     

1 Reply

  • v-kkf-msft's avatar
    v-kkf-msft
    Icon for Community Support rankCommunity Support

    Hi Anonymous ,

     

    You can create the following measure and then use the Ultimate Waterfall visual.

    Price = 
    SUMX ( ALLSELECTED ( 'Table' ), 'Table'[Income] )
        / SUMX ( ALLSELECTED ( 'Table' ), 'Table'[Order Quantity] )

     

    Or use the following measures and Simple Waterfall visual.

     

    Price_Measure = 
    DIVIDE (
        [Price],
        CALCULATE (
            DISTINCTCOUNT ( 'Table'[Effect Name & Customer Type] ),
            ALLSELECTED ( 'Table' )
        )
    )
    Effect Value_Measure = SUM ( 'Table'[Effect Value] ) + [Price_Measure]

     

     

    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.