Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago

Waterfall creation

Hello, 

 

I'm struggling creating a waterfall. Could someone help me please?

 

Thank you by advance.

 

Here the result: 

 

Here the data:

ID ZoneZoneID PaysPaysID FilialeFilialeID AssetAssetID GisementGisementFluidesActive
@31/12/2020
Temporarily suspended
@YE21
Temporarily closed
@YE21
Definitely abandoned
@YE21
Dry
@YE21
Drilled & CompletedTemporarily suspendedConnected to facilitiesTemporarily closedcompleted or Worked overDefinitely abandonedDryOn-going AnonymousActive
@31/12/2021
Temporarily suspended
@YE22
Temporarily closed
@YE22
Definitely abandoned
@YE22
Dry
@YE22
20Zone 2050Pays 50 TestNom100Filiale 100xxxxxx1E+06Asset 10474591E+06Gis. 1047805xxxxxxxxxxop210000000000021000
20Zone 2052Pays 52102Filiale 102xxxxx1008Asset 1008xxxxxx3057Gis. 3057op420000000000042000
20Zone 2052Pays 52102Filiale 102xxxxx1008Asset 1008xxxxxx3057Gis. 3057wi110000000000011000
22Zone 22xxxxxxxxxxxxxxxxxxxxxxxxxxxx67Pays 67xxx1E+06Filiale 10473851E+06Asset 10480251E+06Gis. 1048026op1050000000 0  105000
23Zone 23xxxxx69Pays 69xx121Filiale 121xx1E+06Asset 1037977xxx1E+06Gis. 1038005op12200000000000122000
23Zone 23xxxxx69Pays 69xx121Filiale 121xx1E+06Asset 1037977xxx1E+06Gis. 1038005wi620000000000062000
23Zone 23xxxxx69Pays 69xx121Filiale 121xx1E+06Asset 1037977xxx1E+06Gis. 1038007op35130000000000351300
23Zone 23xxxxx69Pays 69xx121Filiale 121xx1E+06Asset 1037977xxx1E+06Gis. 1038009op921000000000092100
23Zone 23xxxxx72Pays 72162Filiale 162xxxxxxxxxxxxxxxxxxx1E+06Asset 1002521xxx3534Gis. 3534xxxxxxxop806106900    0 080610690
24Zone 24xxxxxxxxx1E+06Pays 10222521E+06Filiale 1022419xxxx1E+06Asset 10288301E+06Gis. 1028852gp6511210000000006511210
24Zone 24xxxxxxxxx1E+06Pays 10222521E+06Filiale 1022419xxxx1E+06Asset 10288301E+06Gis. 1028854gp18701000000000187010
24Zone 24xxxxxxxxx1E+06Pays 10222521E+06Filiale 1022419xxxx1E+06Asset 10288301E+06Gis. 1028858gp782204000000000078220400
24Zone 24xxxxxxxxx1E+06Pays 10222531E+06Filiale 10223371E+06Asset 1022338xxxxx1E+06Gis. 1022339gp83450000000000834500
25Zone 25xx1E+06Pays 10082611E+06Filiale 1008262xxxxxxxx1E+06Asset 1008263xxxxxx1E+06Gis. 1029027ot410500000000041050

 

5 Replies

  • First step is to unpivot your data to bring it into usable shape

     

    let
        Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("xZY9b8IwEIb/SpS1qDqfv8cObbeqQ6ciBoaoQqKlUpBK/33tIzYGH4UwgCUn5pzXeh/nfGE6bRHaSfu++uoaGul4eZ3/9o2G5q3r1y+rzxAREONPi+Vivuya8GtDLc483oEJ94e+79ZhRlmlfRF/XvT3FHagN7mFidV3uGB8MnQY0WvNbFJzYOag5wH3/GO2D+AK9+CyPwnaJv/DmCyrwcIYy7XmWpZ/FsNujd3lWkOWMVvGzT8tPGVswjF2P1V2TMpKp7kkcoBlPCVRCJv0HgTt2QmKprg3vIiwZMaS2b/P/v3WPorSPAo2/6X19oB3cC8dgM7u8YI0YkRXd08JZS4wX2uu6j2fX6mHzJYjzDOiq7r3yb1vxxfNWnPMu80liEbC7JUgwx15BiWc3QhJFUlLlUji+KD8O9IlX7Rz5ckte3maWRkxqcykOIeEFkop4rbEVgUJUQl/BAudk1C/nhCmxT4ikKE8ESNfEqe6JY5KOCJ+aGy7+yKcVaVq0S1hXIKxcYSpBKlzTw8rGwkkjwBJaTmYEHeHqyWiMOcTkYvrRhenPoNlZ0REozON5jDAoREsRpxBhn/3BwWNrGYTjwek0rweXKUsOxep1sxmfw==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [#"ID Zone" = _t, Zone = _t, #"ID Pays" = _t, Pays = _t, #"ID Filiale" = _t, Filiale = _t, #"ID Asset" = _t, Asset = _t, #"ID Gisement" = _t, Gisement = _t, Fluides = _t, #"Active @31/12/2020" = _t, #"Temporarily suspended @YE21" = _t, #"Temporarily closed @YE21" = _t, #"Definitely abandoned @YE21" = _t, #"Dry @YE21" = _t, #"Drilled & Completed" = _t, #"Temporarily suspended" = _t, #"Connected to facilities" = _t, #"Temporarily closed" = _t, #"completed or Worked over" = _t, #"Definitely abandoned" = _t, Dry = _t, #"On-going Anonymous" = _t, #"Active @31/12/2021" = _t, #"Temporarily suspended @YE22" = _t, #"Temporarily closed @YE22" = _t, #"Definitely abandoned @YE22" = _t, #"Dry @YE22" = _t]),
        #"Unpivoted Other Columns" = Table.UnpivotOtherColumns(Source, {"Fluides", "Gisement", "ID Gisement", "Asset", "ID Asset", "Filiale", "ID Filiale", "Pays", "ID Pays", "Zone", "ID Zone"}, "Attribute", "Value"),
        #"Changed Type" = Table.TransformColumnTypes(#"Unpivoted Other Columns",{{"Value", type number}})
    in
        #"Changed Type"

     

    Then you need to indicate which order the items should appear in, and which of them are positive and which are negative.

     

    (And lastly you want to question if a waterfall is really a good way of visualizing your data.)

    • Anonymous's avatar
      Anonymous
      Not applicable

      Thank you for the help.

      I've got this: 

      And now, I'm trying to sort my categories like this example: 

      Could you now help me to sort the categories like the example (not alphabetically nor by value order). The variations (in green and red) impacting the second grey value.

       

      Thanks in advance

       

       

      • lbendlin's avatar
        lbendlin
        Super User

        you need to indicate which order the items should appear in. Add an appropriate index column, then sort your category column by the index column.