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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
manojk_pbi
Helper IV
Helper IV

How to get Change in Percentage with respect to Base line data

Hi Friends,

 

I am looking for a DAX measure to calculate Change in Percentage w.r.t to a particular period by Products. Please suggest me how can we write the optimized DAX for the same. Provided a sample with required output. Baseline is Jan-23 data, this can vary as per business request. Any suggestions are much appreciated.

MY            Product   Qty          %Change

Jan-23PROD1100 
Feb-23PROD112020%
Mar-23PROD113535%
Apr-23PROD114040%
May-23PROD112020%
Jun-23PROD11000%
Jul-23PROD180-20%
Aug-23PROD190-10%
Sep-23PROD175-25%
Oct-23PROD11000%
Nov-23PROD180-20%
Dec-23PROD165-35%

 

Thanks

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi, @manojk_pbi 

Based on your description, I used the following sample data:

vjianpengmsft_0-1711685664597.png

I created a table visual as shown in the image below:

vjianpengmsft_1-1711685752670.png

I created a measure with the following DAX:

Percentage =
VAR _minday =
    CALCULATE ( MIN ( 'Table'[MY] ), ALL ( 'Table' ) )
VAR _mindayQty =
    CALCULATE (
        MIN ( 'Table'[Qty] ),
        FILTER ( ALL ( 'Table' ), 'Table'[MY] = _minday )
    )
RETURN
    IF (
        MIN ( 'Table'[MY] ) = _minday,
        BLANK (),
        DIVIDE ( SUM ( 'Table'[Qty] ) - _mindayQty, _mindayQty )
    )

vjianpengmsft_2-1711685867483.png

Put this measure into the table visual, and the result is as follows:

vjianpengmsft_3-1711685945035.png

I've provided the PBIX file for this time below, and it would be great if I could help you.

 

 

 

 

How to Get Your Question Answered Quickly

If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .

Best Regards

Jianpeng Li

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

5 REPLIES 5
Anonymous
Not applicable

Hi, @manojk_pbi 

Based on your description, I used the following sample data:

vjianpengmsft_0-1711685664597.png

I created a table visual as shown in the image below:

vjianpengmsft_1-1711685752670.png

I created a measure with the following DAX:

Percentage =
VAR _minday =
    CALCULATE ( MIN ( 'Table'[MY] ), ALL ( 'Table' ) )
VAR _mindayQty =
    CALCULATE (
        MIN ( 'Table'[Qty] ),
        FILTER ( ALL ( 'Table' ), 'Table'[MY] = _minday )
    )
RETURN
    IF (
        MIN ( 'Table'[MY] ) = _minday,
        BLANK (),
        DIVIDE ( SUM ( 'Table'[Qty] ) - _mindayQty, _mindayQty )
    )

vjianpengmsft_2-1711685867483.png

Put this measure into the table visual, and the result is as follows:

vjianpengmsft_3-1711685945035.png

I've provided the PBIX file for this time below, and it would be great if I could help you.

 

 

 

 

How to Get Your Question Answered Quickly

If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .

Best Regards

Jianpeng Li

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

Anonymous
Not applicable

Hi, @manojk_pbi 

Your solution is great, @bhanu_gautam . It worked like a charm! Has your problem been solved? 

 

 

 

How to Get Your Question Answered Quickly

If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .

Best Regards

Jianpeng Li

 

 

bhanu_gautam
Super User
Super User

Try creating measure and pull that into visuals




Did I answer your question? Mark my post as a solution! And Kudos are appreciated

Proud to be a Super User!




LinkedIn






bhanu_gautam
Super User
Super User

@manojk_pbi , You can try using below measure

 

%Change =
VAR BaselineQty = CALCULATE(SUM(Table1[Qty]), FILTER(ALL(Table1), Table1[MY] = "Jan-23"))
VAR CurrentQty = SUM(Table1[Qty])
RETURN
IF(
BaselineQty <> 0,
DIVIDE(CurrentQty - BaselineQty, BaselineQty),
BLANK()
)

 

Please accept as solution and give kudos if it helps




Did I answer your question? Mark my post as a solution! And Kudos are appreciated

Proud to be a Super User!




LinkedIn






Hi @bhanu_gautam , thanks for quick response.

 

Where can i use this measure, should i be creating the column in the table or use the measure directly into charts ? How will this consider product filter ? Data i am looking at Product level

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.