Supplies are limited. Contact info@espc.tech right away to save your spot before the conference sells out.
Get your discountScore big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount
I have five variables: A, A1, B, B1 ,C and I want to create two measures, Can someone kindly help me build the dax function? Thanks!
1. IF C=0, show "Not available" IF not then:
IF A1-A>=6 or B1-B>=4, show "Yes"
otherwise, show "No"
For all other conditions, show NULL
2. IF C=0, show "Not available" IF not then:
If (B1>=8 or A1>=10) and (B1<8 and A1<6) , show "Yes"
otherwise, show "No"
For all other conditions, show NULL
Solved! Go to Solution.
Try
IF(C=0,"Not available",If((B1>=8 || A1>=10) && (B1<8 && A1<6) , "Yes","No"))
Appreciate your Kudos. In case, this is the solution you are looking for, mark it as the Solution. In case it does not help, please provide additional information and mark me with @
Thanks.
My Recent Blog - https://community.powerbi.com/t5/Community-Blog/Comparing-Data-Across-Date-Ranges/ba-p/823601
Hi @xiumi_hou ,
Please update the formulas of BaseLineBaseDate and BaseLineActurlDate as below to check again.
BaseLineBaseDate = MINX(AllSELECTED (Score_GAD7),Score_GAD7[GAD.session_date])
BaseLineActurlDate= MAXX(AllSELECTED (Score_GAD7),Score_GAD7[GAD.session_date])
If it doesn't meet your requirement, kindly share your sample data and excepted result to me if you don't have any Confidential Information. Please upload your files to One Drive and share the link here.
you can try like this
if(c=0,"Not available",if(A1-A>=6 || B1-B>=4,"YES","NO"))
Appreciate your Kudos. In case, this is the solution you are looking for, mark it as the Solution. In case it does not help, please provide additional information and mark me with @
Thanks.
My Recent Blog - https://community.powerbi.com/t5/Community-Blog/Comparing-Data-Across-Date-Ranges/ba-p/823601
Try
IF(C=0,"Not available",If((B1>=8 || A1>=10) && (B1<8 && A1<6) , "Yes","No"))
Appreciate your Kudos. In case, this is the solution you are looking for, mark it as the Solution. In case it does not help, please provide additional information and mark me with @
Thanks.
My Recent Blog - https://community.powerbi.com/t5/Community-Blog/Comparing-Data-Across-Date-Ranges/ba-p/823601
Thank you. The last question. If want to add another conditions. If B1<8 and A1<10 show "Start below caselevel"
Can you help me add to your dax function? I also provide mine, which gave error can you help me look at it: @amitchandak
Hi @amitchandak :
The error is the data is not correct: please see my below function:
Actually, my Sincebaseline_GAD is 9(which is bigger than 4), which shold gave "Yes" result, but the result here show "No", I checked the raw data, The sincebaseline_GAD using my function below show -17... Can you help me check which part is wrong? The filter I am using is in case table. Thanks
Hi @xiumi_hou ,
Please update the formulas of BaseLineBaseDate and BaseLineActurlDate as below to check again.
BaseLineBaseDate = MINX(AllSELECTED (Score_GAD7),Score_GAD7[GAD.session_date])
BaseLineActurlDate= MAXX(AllSELECTED (Score_GAD7),Score_GAD7[GAD.session_date])
If it doesn't meet your requirement, kindly share your sample data and excepted result to me if you don't have any Confidential Information. Please upload your files to One Drive and share the link here.
Here's the general format:
Measure = IF(C = 0, "Not Available",
IF(OR(A1 - A >= 6, B1 - B >= 4) = TRUE, "Yes", "NO)
There's no way to get the Nulls in this unless there's more logic steps I'm missing.