Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
Any1 know what's wrong with this DAX? if the BequestDate contain 2016, i want the new handraisers=2016, if the BequestDate contain 2017, i want the new handraisers = 2017, if the BequestDate contain 2018, i want the new handraisers = 2018. otherwise = blank.
thanks
Solved! Go to Solution.
What's the column type of BequestDate? If it is Text, you would get this kind of result. You can change the column Type to Number, and use the kind of following DAX
New Handraisers = IF((ContactSet[BequestDates]<=2016),2016,IF((ContactSet[BequestDates]=2017),2017,IF((ContactSet[BequestDates]>=2018),2018)))
BTW: you need to adjust the DAX based on the vaule of BequestDate
Hi @Anonymous,
You can use below formula to solve your problem.
New Handraisers = if(SEARCH("2016",ContactSet[BequestDates],,-1)>0,"2016", if(SEARCH("2017",ContactSet[BequestDates],,-1)>0,"2017", if(SEARCH("2018",ContactSet[BequestDates],,-1)>0,"2018","")))
The "CONTAINS" functions returns true if values for all referred columns exist, or are contained, in those columns; otherwise, the function returns false.
Thanks,
Rahul
Hi @Anonymous,
You can use below formula to solve your problem.
New Handraisers = if(SEARCH("2016",ContactSet[BequestDates],,-1)>0,"2016", if(SEARCH("2017",ContactSet[BequestDates],,-1)>0,"2017", if(SEARCH("2018",ContactSet[BequestDates],,-1)>0,"2018","")))
The "CONTAINS" functions returns true if values for all referred columns exist, or are contained, in those columns; otherwise, the function returns false.
Thanks,
Rahul
What's the column type of BequestDate? If it is Text, you would get this kind of result. You can change the column Type to Number, and use the kind of following DAX
New Handraisers = IF((ContactSet[BequestDates]<=2016),2016,IF((ContactSet[BequestDates]=2017),2017,IF((ContactSet[BequestDates]>=2018),2018)))
BTW: you need to adjust the DAX based on the vaule of BequestDate
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
145 | |
85 | |
66 | |
52 | |
48 |
User | Count |
---|---|
215 | |
90 | |
83 | |
67 | |
59 |