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
Hamdan1234
Helper III
Helper III

Waterfall Chart with measures

Hello,

I have a year filter which make the graph look like below picture.

werwettwt.PNG

I have made the year filter to single select now it shows one year of data as below.

afwetwe.PNG

But I want to see the water fall chart as on single selection of year it should show the selected year as well as the previous year in water fall char as well like below picture. Expected Behaviour.png

Can anybody help? I need to get it done in couple of hours for my presentation. 

Thanks

1 ACCEPTED SOLUTION

Hi  @Hamdan1234 ,

 

Create a date table as below:

Date = CALENDAR(MIN('Table'[Date]),MAX('Table'[Date]))

Then create a measure as below:

Measure =
VAR _mindate =
    MINX ( DATEADD ( 'Date'[Date], -1, YEAR ), [Date] )
VAR _maxdate =
    CALCULATE ( MAX ( 'Date'[Date] ), ALLSELECTED ( 'Date' ) )
RETURN
    IF (
        MAX ( 'Table'[Date] ) >= _mindate
            && MAX ( 'Table'[Date] ) <= _maxdate,
        SUM ( 'Table'[Value] )
    )

And you will see:

vkellymsft_0-1635400535592.png

 

For the related .pbix file,pls see attached.

 

Best Regards,
Kelly

Did I answer your question? Mark my reply as a solution!

View solution in original post

3 REPLIES 3
speedramps
Super User
Super User

Hi Hamdan1234 

 

Slicers do what they they say on the tin.  They slice !

So if you slice your fact table or calendar table related to the fact table by 1 year then it will slice your date only for that year.

 

The work arround is to copy your calandar as a detatched picklist table.

Now when the user clicks on the picklist slicer it will not slice the fact data.
So it still shows evereything.

 

Then you change the measure only to return data if the fact date is between the picklist date - 1 year and picklist date.

 

Now when the user clicks the picklist slicers the graph will show the picklist year and the previous year.


Remember we dont get paid, we are BI community voluntrees so please click the thumbs-up for me taking the trouble to help you and then accept the solution if it works.  Thank you !

Hello @speedramps ,

Can't we create a slicer that has selection value of both selected year and previous year? i guess it should be possible in other Waterfall chart available in store because they are taking more than one values while default chart takes only one value for the Value field. 

Hi  @Hamdan1234 ,

 

Create a date table as below:

Date = CALENDAR(MIN('Table'[Date]),MAX('Table'[Date]))

Then create a measure as below:

Measure =
VAR _mindate =
    MINX ( DATEADD ( 'Date'[Date], -1, YEAR ), [Date] )
VAR _maxdate =
    CALCULATE ( MAX ( 'Date'[Date] ), ALLSELECTED ( 'Date' ) )
RETURN
    IF (
        MAX ( 'Table'[Date] ) >= _mindate
            && MAX ( 'Table'[Date] ) <= _maxdate,
        SUM ( 'Table'[Value] )
    )

And you will see:

vkellymsft_0-1635400535592.png

 

For the related .pbix file,pls see attached.

 

Best Regards,
Kelly

Did I answer your question? Mark my reply as a solution!

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.