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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
bilingual
Helper V
Helper V

Percentage difference from filtered value - fixed measure based on Week for multiple variables?

Hi everybody, i want to create an index of my data where it will show the number of transcations compared to week 10/2020, so far so good i have created this Measure which works fine: 
 
Title =
VAR __BASELINE_VALUE = CALCULATE(SUM('Data_akk'[Number of transactions]); 'Data_akk'[Weeknr] IN { 10 })
VAR __MEASURE_VALUE = SUM('Data_akk'[Number of transactions])
RETURN
    IF(
        NOT ISBLANK(__MEASURE_VALUE);
        DIVIDE(__MEASURE_VALUE - __BASELINE_VALUE; __BASELINE_VALUE)
    )
 
One question: 
1. If i want to make more variables show the percentage difference, can i do so without creating this measure for each?
 
2 ACCEPTED SOLUTIONS
amitchandak
Super User
Super User

@bilingual , I doubt you have to create measures like this.

View solution in original post

Hi @bilingual ,

 

You do need to create measures for different weeks, unless you want the following, then you can use the slicer to change the weeks.

Measure 8 = 
VAR x = 
CALCULATE(
    SUM(Sheet3[Trans]),
    ALLEXCEPT(Sheet3, Sheet3[Week])
)
VAR y = 
CALCULATE(
    SUM(Sheet3[Trans]),
    ALL(Sheet3)
)
RETURN
DIVIDE(
    y-x,
    x,
    BLANK()
)

 

Best regards,
Lionel Chen

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
amitchandak
Super User
Super User

@bilingual , I doubt you have to create measures like this.

So please enlighten me a better practice , i am an novice 🙂

Hi @bilingual ,

 

Please give me a sample data of 'Data_akk' table?

 

Best regards,
Lionel Chen

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

Hi Lionel, here it comes how data in Data_Akk is placed :

 

From this data i would like to create a dynamic Index from Week 10 2020, so i do not need to create one for each variable.

 

 

DateWeekTransactionsRemindersAmmountEmails
02-04-20201445545541500000700
03-04-20201421313222000044800
04-04-20201454846457400000900

Hi @bilingual ,

 

You do need to create measures for different weeks, unless you want the following, then you can use the slicer to change the weeks.

Measure 8 = 
VAR x = 
CALCULATE(
    SUM(Sheet3[Trans]),
    ALLEXCEPT(Sheet3, Sheet3[Week])
)
VAR y = 
CALCULATE(
    SUM(Sheet3[Trans]),
    ALL(Sheet3)
)
RETURN
DIVIDE(
    y-x,
    x,
    BLANK()
)

 

Best regards,
Lionel Chen

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

Helpful resources

Announcements
Fabcon_Europe_Social_Bogo

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

Power BI Carousel June 2024

Power BI Monthly Update - June 2024

Check out the June 2024 Power BI update to learn about new features.

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.