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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
Fidzi8
Helper V
Helper V

Precentage difference between the date

Hi,
I need advice. 

I have table with this columns

b7f198e8-e509-4a94-b1ff-dccdf8debad1.png

 

I want to create percenatge difference between the date

For example: from 3 325Kč to 3 500Kč = 5,2%

 

2022-01-19_11h58_45.png

Thank you
Ondřej

 

2 ACCEPTED SOLUTIONS
amitchandak
Super User
Super User

@Fidzi8 , Assume you are using a date table for slicer,

 

Try measure like

 

Measure =
VAR _min = MINX(allselected(Dates) ,Dates[Date])
VAR _max = MAXX(allselected(Dates) ,Dates[Date])
return
calculate(sum(Table[cost]), filter(Dates, Dates[Date] =_max)) -calculate(sum(Table[cost]), filter(Dates, Dates[Date] =_min))

 

 

Day Intelligence - Last day, last non continous day
https://medium.com/@amitchandak.1978/power-bi-day-intelligence-questions-time-intelligence-5-5-5c324...

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

v-angzheng-msft
Community Support
Community Support

Hi, @Fidzi8 

Try this:

Measure =
VAR _min =
    MINX( ALLSELECTED( Dates ), Dates[Date] )
VAR _max =
    MAXX( ALLSELECTED( Dates ), Dates[Date] )
VAR _a =
    CALCULATE(
        SUM( Table[cost] ),
        FILTER( ALL( 'Dates' ), Dates[Date] = _min )
    )
VAR _b =
    CALCULATE(
        SUM( Table[cost] ),
        FILTER( ALL( 'Dates' ), Dates[Date] = _max )
    )
RETURN
    DIVIDE( b - a, b )

Or, please share your sample pbix file's link here, then I can try to look into it to come up with a more accurate measure.

 

 

Best Regards,
Community Support Team _ Zeon Zheng

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

3 REPLIES 3
v-angzheng-msft
Community Support
Community Support

Hi, @Fidzi8 

Try this:

Measure =
VAR _min =
    MINX( ALLSELECTED( Dates ), Dates[Date] )
VAR _max =
    MAXX( ALLSELECTED( Dates ), Dates[Date] )
VAR _a =
    CALCULATE(
        SUM( Table[cost] ),
        FILTER( ALL( 'Dates' ), Dates[Date] = _min )
    )
VAR _b =
    CALCULATE(
        SUM( Table[cost] ),
        FILTER( ALL( 'Dates' ), Dates[Date] = _max )
    )
RETURN
    DIVIDE( b - a, b )

Or, please share your sample pbix file's link here, then I can try to look into it to come up with a more accurate measure.

 

 

Best Regards,
Community Support Team _ Zeon Zheng

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

amitchandak
Super User
Super User

@Fidzi8 , Assume you are using a date table for slicer,

 

Try measure like

 

Measure =
VAR _min = MINX(allselected(Dates) ,Dates[Date])
VAR _max = MAXX(allselected(Dates) ,Dates[Date])
return
calculate(sum(Table[cost]), filter(Dates, Dates[Date] =_max)) -calculate(sum(Table[cost]), filter(Dates, Dates[Date] =_min))

 

 

Day Intelligence - Last day, last non continous day
https://medium.com/@amitchandak.1978/power-bi-day-intelligence-questions-time-intelligence-5-5-5c324...

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Hi @amitchandak,
thank you for your help.

 

The formula doesn´t work properly and I don´t know where the error might be.

Fidzi8_0-1642753675616.png

 

 

 

Thank you

Ondřej

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

Fabric Community Sticker Design Challenge Barcelona Carousel

Fabric Community Sticker Challenge - Barcelona 2026

If you love stickers, then you will definitely want to check out our community sticker challenge, Barcelona edition!

July Power BI Update Carousel

Power BI Monthly Update - July 2026

Check out the July 2026 Power BI update to learn about new features.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Top Solution Authors