cancel
Showing results 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

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

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

Community Support

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.

5 REPLIES 5
Super User

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

Helper V

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

Community Support

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.

Helper V

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.

 Date Week Transactions Reminders Ammount Emails 02-04-2020 14 45545 54 1500000 700 03-04-2020 14 21313 22 2000044 800 04-04-2020 14 54846 45 7400000 900
Community Support

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.

Announcements

#### 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 Monthly Update - June 2024

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

#### New forum boards available in Real-Time Intelligence.

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

Top Solution Authors
Top Kudoed Authors