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.
Hi all,
I'm migrating a client's dashboards off of another vendor's platform into Power BI. However, all the calculations are handled in this weird SQL-like language in the backend. I'm not too great at nesting, so could you help me translate a couple into DAX? I can use it as a benchmark for the rest. I've pre-formatted it for readability.
The true extent of the insanity is something like this:
I understand that it's mostly just a crazy string of AND()s in series, but getting the DAX syntax down is driving me nuts. If someone could translate these two, I can repurpose pieces of it in all the other calcs.
Thanks!
Hi @RMDNA
transforms from
COUNT(tracking number) where OnTimeRateDate <>(empty value)
and Date (calldate)between _start of date selection and _end of date selection
and Status in (INVOICED, COMPLETED)
and Extended Status in ((empty value),CONFIRMED, PENDING CONFIRMATION, COMPLETED)
and IsScheduledDateChangeFlag=1), 0)
[tracking number],[OnTimeRateDate],[calldate],[Status],Extended Status],[IsScheduledDateChangeFlag]
these are considered as columns in one table, (is my understanding right?)
"INVOICED","CONFIRMED" ...
are considered as text string, (right?)
then i create a measure in Power BI Desktop as below,
Please Try this firstly, if it doesn't work, please let me know more details
Measure = CALCULATE ( COUNT[tracking number], FILTER ( ALL ( tablename ), MAX([OnTimeRateDate]) <> BLANK () && MAX([calldate]) <= [measure of _end of date selection] && MAX([calldate]) >= [measure of _start of date selection] && MAX([Status]) IN { "INVOICED", "COMPLETED" } && MAX([Extended Status]) IN { " ", "CONFIRMED", "PENDING CONFIRMATION", "COMPLETED" } && MAX([IsScheduledDateChangeFlag]) = 1 ) )
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
110 | |
97 | |
77 | |
63 | |
55 |
User | Count |
---|---|
143 | |
109 | |
89 | |
84 | |
66 |