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
theunissenp
Helper I
Helper I

Calculate Delta planning version with planning group segmentation

Hi all,

 

I used the following formula to calculate the delta between to version:

 

Delta =
VAR SelectedVersion= VALUES(Test[Planning version])
VAR Minvalue= MINX(
    SelectedVersion,
    CALCULATE(
        SUM(
            Test[Value])))
VAR Maxvulue= MAXX(SelectedVersion,
    CALCULATE(
        SUM(
            Test[Value])))
VAR Difference = Maxvulue - Minvalue
RETURN
    Difference
   
Dataset:
Planning versionPlanning datePlanning groupeValue
101/01/2022Citybike10
101/01/2022Mountain bike20
101/01/2022Race bike50
101/01/2022Cross bike40
201/01/2022Citybike20
201/01/2022Mountain bike50
201/01/2022Race bike5
102/01/2022Citybike15
102/01/2022Mountain bike25
102/01/2022Race bike55
102/01/2022Cross bike45
202/01/2022Citybike20
202/01/2022Mountain bike50
202/01/2022Race bike5
theunissenp_0-1663848373421.png

 

In the result i am missing the delta for Cross bikes. 

 

Can any one help me? 

 

PBIX file: https://drive.google.com/file/d/1-S9nAhHpFyldQVtlOulMqPLxhhEq8tvP/view?usp=sharing

 

Regards,

 

Paul

1 ACCEPTED SOLUTION

Hi, @theunissenp 

It is recommended to add a separate dimension table:

Planed version = DISTINCT(Test[Planning version])

In the matrix visual, you need replace field 'Planned Version' in fact table with field 'Planned Version' in new dimension table.

veasonfmsft_0-1665392770458.png

Best Regards,
Community Support Team _ Eason

View solution in original post

5 REPLIES 5
theunissenp
Helper I
Helper I

Is there any one who can help me?

 

Hi, @theunissenp 

It is recommended to add a separate dimension table:

Planed version = DISTINCT(Test[Planning version])

In the matrix visual, you need replace field 'Planned Version' in fact table with field 'Planned Version' in new dimension table.

veasonfmsft_0-1665392770458.png

Best Regards,
Community Support Team _ Eason

Thanks for your reply. I added the table but the delta formula is not giving any value for the delta for Cross bikes...

 

Delta formula:

Delta =
VAR SelectedVersion=
VALUES('Planed version'[Planning version])
VAR Minvalue=
MINX(
    SelectedVersion,
    CALCULATE(
        SUM(
            Test[Value])))
VAR Maxvulue=
    MAXX(SelectedVersion,
    CALCULATE(
        SUM(
            Test[Value])))
VAR Difference =
    Maxvulue - Minvalue
RETURN
    Difference
   
Thanks for your respons.
 
Regards,
 
Paul
tamerj1
Super User
Super User

Hi @theunissenp 

Asking a question that might drive you to find solution. What is the expected results based on this sample?

Currently, the delta for cross bikes is missing. This is missing because this planning group is not planned in both versions. I want to show it anyway.

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.