cancel
Showing results for 
Search instead for 
Did you mean: 

Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.

Reply
doctorv1979
Frequent Visitor

Custom waterfall chart include previous months

 
I need to include prevvious months data as static bars on my chart in addition to the the waterfall chart. Something like this. Is this possible. I need to show End FY22, End Q1, Jauary and February data. I can do it in excel but unable to do this in Power BI. Any tips?
doctorv1979_0-1680205085763.png

 

 

1 REPLY 1
v-yangliu-msft
Community Support
Community Support

Hi  @doctorv1979 ,

 

Here are the steps you can follow:

1. Create calculated column.

 

Month = FORMAT('Table'[Date],"mmmm" )

 

vyangliumsft_0-1680491907844.png

2. Enter data – create table.

vyangliumsft_1-1680491907845.png

3. Create calculated table.

 

Table 2 =
var _table1=
SUMMARIZE('Table','Table'[Month])
return
UNION(
  _table1  ,'Group Table')

 

4. Create measure.

 

Measure =
var _today=YEAR(TODAY())
return
SWITCH(
    TRUE(),
    MAX('Table 2'[Month])="End FY22",
    SUMX(
        FILTER(ALL('Table'),
        YEAR('Table'[Date])=2022),[Value]),
        MAX('Table 2'[Month])="End FY23",
    SUMX(
        FILTER(ALL('Table'),
        YEAR('Table'[Date])=2023),[Value]),
    MAX('Table 2'[Month])= "End Q1",
    SUMX(
        FILTER(ALL('Table'),
        YEAR('Table'[Date])=_today&&QUARTER('Table'[Date])=1),[Value])
  ,
    MAX('Table 2'[Month])= "End Q2",
    SUMX(
        FILTER(ALL('Table'),
        YEAR('Table'[Date])=_today&&QUARTER('Table'[Date])=2),[Value]),
    MAX('Table 2'[Month])= "End Q3",
    SUMX(
        FILTER(ALL('Table'),
        YEAR('Table'[Date])=_today&&QUARTER('Table'[Date])=3),[Value]),
    MAX('Table 2'[Month])= "End Q4",
    SUMX(
        FILTER(ALL('Table'),
        YEAR('Table'[Date])=_today&&QUARTER('Table'[Date])=4),[Value]),
    SUMX(
        FILTER(ALL('Table'),
        YEAR('Table'[Date])=_today&&'Table'[Month] in SELECTCOLUMNS('Table 2',"1",[Month])),[Value]))
Flag =
var _table=
FILTER(
'Table',NOT( 'Table'[Month]) in {"January","February"})
var _table2=
SUMMARIZE(
    _table,[Month])
return
IF(
    MAX('Table 2'[Month]) in _table2,0,1)

 

 

5. Place [Flag]in Filters, set is=1, apply filter.

vyangliumsft_0-1680492032562.png

6. Result:

vyangliumsft_1-1680492037429.png

 

Best Regards,

Liu Yang

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

Helpful resources

Announcements
PBI November 2023 Update Carousel

Power BI Monthly Update - November 2023

Check out the November 2023 Power BI update to learn about new features.

Community News

Fabric Community News unified experience

Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.

Dashboard in a day with date

Exclusive opportunity for Women!

Join us for a free, hands-on Microsoft workshop led by women trainers for women where you will learn how to build a Dashboard in a Day!

Power BI Fabric Summit Carousel

The largest Power BI and Fabric virtual conference

130+ sessions, 130+ speakers, Product managers, MVPs, and experts. All about Power BI and Fabric. Attend online or watch the recordings.

Top Solution Authors
Top Kudoed Authors