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
Anonymous
Not applicable

Measure based on values of three columns with a special formula

Hello great PBI Community!

 

Can you please help me to develop a measure? 

As you see below I have some data on the beginning of each month for three years, where the "Parameter" column needs to be normalised using a "Correction Factor" for each month. 

Here is the formula that I intend to use: 

Corrected Parameter = ((Parameter in any specific month)-min(Parameters in the last 12 month))*Correction factor+min(Parameters in the last 12 month)

 

Note: for the first year indeed "min(Parameters in the last 12 month)" might be tricky as data is not available for 12 months. 

 

Page 1.JPG

 

4 REPLIES 4
v-shex-msft
Community Support
Community Support

HI @ehsanb,

Did these suggestions help with your scenario? If this is a case, you can choose the best one to accept it to help others who faced the same issue to find it more quickly.
If the above not help, please feel free to post here with detailed information and description, then we can test and troubleshoot on it.

Regards,
Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.
Anonymous
Not applicable

@amitchandak I used your advice to develop a new measure to find part of the measure I intended (see below formula and graph): 

min(Parameters in the last 12 month)

 

MinParameterLast12Months = CALCULATE(MIN(Blad1[Parameter]),DATESINPERIOD(Blad1[Date], MAX(Blad1[Date]),-12,MONTH))

 

Can you help me to complete the measure?

Corrected Parameter = ((Parameter in any specific month)-min(Parameters in the last 12 month))*Correction factor+min(Parameters in the last 12 month)

 

Page 2.JPG

HI @Anonymous,

You can try to use the following measure formula if this suitable for your requirement:

Measure =
VAR currDate =
    MAX ( Table[Date] )
VAR prevPara =
    CALCULATE (
        MIN ( Table[Parameter] ),
        FILTER (
            ALLSELECTED ( Table ),
            [Date]
                = DATE ( YEAR ( currdate ), MONTH ( currDate ) - 12, DAY ( currDate ) )
        )
    )
RETURN
     ( MAX ( Table[Paramter] ) - prevPara ) * 'Correction factor' + prevPara

If the above not help, it will help if you share some dummy data with raw table structures to test:

How to Get Your Question Answered Quickly 

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.
amitchandak
Super User
Super User

@Anonymous , you can use a formula like this with date table

Rolling 12 = CALCULATE(max(Table[Correction Factor]),DATESINPERIOD('Date'[Date ],MAX('Date'[Date ]),-12,MONTH))

 

For other refer

Power BI — Year on Year with or Without Time Intelligence
https://medium.com/@amitchandak.1978/power-bi-ytd-questions-time-intelligence-1-5-e3174b39f38a
Power BI — Qtr on Qtr with or Without Time Intelligence
https://medium.com/@amitchandak.1978/power-bi-qtd-questions-time-intelligence-2-5-d842063da839
Power BI — Month on Month with or Without Time Intelligence
https://medium.com/@amitchandak.1978/power-bi-mtd-questions-time-intelligence-3-5-64b0b4a4090e

 

To get the best of the time intelligence function. Make sure you have a date calendar and it has been marked as the date in model view. Also, join it with the date column of your fact/s. Refer :radacad sqlbi My Video Series Appreciate your Kudos.

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.