Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi Experts,
I am working on a scenario which is having multiple IF conditions and also having some sub-calculations which makes me confused and challenging.
Below the requirement :
If the "Cost Spent YTD" is more than 10% of Planned cost YTD", it should be "Red", if less than 10%, it should be "Amber" otherwise "Green" and
If the "Overall budgeted cost" is less than "Cost Spent YTD"+"What is still needed to complete the project?" by more than 10% then "Red", if it is less than 10% and more than 0%, then "Amber", otherwise "Green" and
If "Is the budget overrun due to customer dependency/CG side?" is "Yes" and Previous 2 IF conditions are "Red", then change the status to "Amber" and
If "Is the CR raised for this additional cost?" is "Yes" then keep the same colour of previous IF condition and
If "Is the CR approved for this additional cost?" is "Yes" then change the colour to "Green", otherwise keep the same colour and
If "Is there a dip in margin?" is less than 0% then change the colour to "Amber" , if it is less than -3% then "Red" otherwise "Green" and
If "is the SOW signed?" is "No" then change the colour to "Amber" if it was "Green", if it is already "Red", keep it "Red" only and
If "Is there any outstanding invoices to be raised?" is "Yes" then change the colour to "Amber" if it was "Green" ,if it is already "Red", keep it "Red" only
It should be a calculated column to add into table visual.
DAX which i have created by using some other references:
Based on the data source it should give only "RED" as per below condition
Please help to solve this calculation .
Thanks
DK
Hi @dinesharivalaga ,
Your DAX may need to be modified.
The part of the expression in the DAX that corresponds to this scenario should be /0.9/ instead of /0.1/.
If the "Overall budgeted cost" is less than "Cost Spent YTD"+"What is still needed to complete the project?" by more than 10% then "Red", if it is less than 10% and more than 0%, then "Amber", otherwise "Green"
The part of the expression in the DAX that corresponds to this scenario should be /Yes/ instead of /CG/.
If "Is the budget overrun due to customer dependency/CG side?" is "Yes" and Previous 2 IF conditions are "Red", then change the status to "Amber"
@Anonymous
Below the table which i am working on it.
Cost logic 1 is a DAX , once it added into the table , the account names were duplicated and resulting all the colours in the Cost logic column. but based on the formula it should give only "RED".
Suspect that the duplication was happened due to the budget status column (Unpivoted column applied) , so that all the values are present as a different rows and given all the results in the cost logic 1. Anyhow we will not use budget status in the table.
DAX formula used as you know :
Expected result : Account names are just a sample dummy names.
Hope this data is OK for you ..
Thanks
DK
@Anonymous Thanks for your response 🙂
The part of the expression in the DAX that corresponds to this scenario should be /Yes/ instead of /CG/.
If "Is the budget overrun due to customer dependency/CG side?" is "Yes" and Previous 2 IF conditions are "Red", then change the status to "Amber" --> Sorry it is not Yes/No , actually the choices should be CG / Customer
The part of the expression in the DAX that corresponds to this scenario should be /0.9/ instead of /0.1/.
If the "Overall budgeted cost" is less than "Cost Spent YTD"+"What is still needed to complete the project?" by more than 10% then "Red", if it is less than 10% and more than 0%, then "Amber", otherwise "Green" --> Yes I have updated it into 0.9
But my question is about Cost (1st condition)
Can you please share your feedback on that ?
User | Count |
---|---|
25 | |
12 | |
8 | |
7 | |
7 |
User | Count |
---|---|
25 | |
12 | |
11 | |
10 | |
6 |