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 having some trouble converting this Sql query to DAX
Solved! Go to Solution.
@Anonymous , For all the group bys you need to have columns in table, that will be added to the visual for the grouping.
With this new column
Month = month([orgstartdate])
You need measures for aggregated values
Most of measure will created like this with appropriate aggregation
BaseRevenue =
calculate(Sum(PasF_BookingJourney[RevenueAll]), filter(PasF_BookingJourney, [AGMST_CUSMST_ID] = "525775" && [regdate] <= Date(2020,03,01) && [OrgSTARTDATE] >= date(2020,03,01)
&& ([CANXDATE] >= date(2020,03,01) || isblank([CANXDATE]))))
This will be bit different
Legs =
calculate(countows(summarize(PasF_BookingJourney,[ID],[OrgSTARTDATE])), filter(PasF_BookingJourney, [AGMST_CUSMST_ID] = "525775" && [regdate] <= Date(2020,03,01) && [OrgSTARTDATE] >= date(2020,03,01)
&& ([CANXDATE] >= date(2020,03,01) || isblank([CANXDATE]))))
@Anonymous , For all the group bys you need to have columns in table, that will be added to the visual for the grouping.
With this new column
Month = month([orgstartdate])
You need measures for aggregated values
Most of measure will created like this with appropriate aggregation
BaseRevenue =
calculate(Sum(PasF_BookingJourney[RevenueAll]), filter(PasF_BookingJourney, [AGMST_CUSMST_ID] = "525775" && [regdate] <= Date(2020,03,01) && [OrgSTARTDATE] >= date(2020,03,01)
&& ([CANXDATE] >= date(2020,03,01) || isblank([CANXDATE]))))
This will be bit different
Legs =
calculate(countows(summarize(PasF_BookingJourney,[ID],[OrgSTARTDATE])), filter(PasF_BookingJourney, [AGMST_CUSMST_ID] = "525775" && [regdate] <= Date(2020,03,01) && [OrgSTARTDATE] >= date(2020,03,01)
&& ([CANXDATE] >= date(2020,03,01) || isblank([CANXDATE]))))
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 |
---|---|
112 | |
100 | |
80 | |
64 | |
57 |
User | Count |
---|---|
146 | |
110 | |
93 | |
84 | |
67 |