Forum Discussion
AFRATH34
Helper I
2 years agoHelp me to write the Measure calculation in Power BI
Hi Team, I hope this email finds you well. I need assistance with writing a Measure calculation in Power BI that involves two conditions. Although I have mentioned the two conditions correctl...
- Anonymous2 years ago
Hi AFRATH34
Before write a measure, you need to change the format of "New_date1" and "New_date2" to the date type.
Then try the following measure:MEASURE = IF ( SELECTEDVALUE ( 'All'[New_Date1] ) < SELECTEDVALUE ( Date_Table[SelectedMonthEnd] ) && SELECTEDVALUE ( 'All'[New_Date1] ) > SELECTEDVALUE ( Date_Table[SelectedMonthStart] ), SELECTEDVALUE ( 'All'[Upfront Gross Profit] ) * SELECTEDVALUE ( 'All'[IG Forecast TCGP] ), BLANK () )Measure2 = IF ( SELECTEDVALUE ( 'All'[New_Date2] ) < SELECTEDVALUE ( Date_Table[SelectedMonthEnd] ) && SELECTEDVALUE ( 'All'[Expiry Date] ) >= SELECTEDVALUE ( Date_Table[SelectedMonthStart] ), SELECTEDVALUE ( 'All'[Recurring Gross Profit per Period] ) * SELECTEDVALUE ( 'All'[IG Forecast TCGP] ), BLANK () )Result:
Best Regards,
Jayleny
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
AFRATH34
Helper I
2 years agoHi BeaBF ,
Please find the link to the file: [https://drive.google.com/drive/folders/1fl52xaMFfa5lRMOzGqfwy_MQdbal3tAu ].
I need your support in creating a measure column. I have not created the measure yet and would appreciate your assistance. The desired output for the "J0D8" Opp ID was mentioned in an earlier screenshot.
Here are the conditions for the measure:
- If New Date1 < SelectedMonthEnd and SelectedMonthStart <= New Date1, then the measure should be Upfront Gross Profit * IG Forecast TCGP.
- If New Date2 < SelectedMonthEnd and Expiry Date >= SelectedMonthStart, then the measure should be Recurring Gross Profit per Period * IG Forecast TCGP.
Thank you for your support.
Best regards,
Afrath