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, I am trying to convert an SQL query to Dax - any ideas please?
select
l.council,
sg,
type,
population,
case
when datepart(month, transaction_date) < 7 then 'H1' else 'H2' end as half,
datepart(year,transaction_date) as year,
sum(amount) as total
from
sg_client_region l join sg_trans_mapped r
on l.clientID = r.customer_id
join pops r2 on l.council = r2.council
where r.subcategory not like ('%transfer%') and transaction_date > '2017-01-01'
group by
l.council, sg, type, population, datepart(year,transaction_date),
case when datepart(month, transaction_date) < 7 then 'H1' else 'H2' end;
Cheers
Solved! Go to Solution.
Hi @Anonymous ,
For your requirement, you could refer to this article about how to convert SQL query to DAX firstly.
If you still need help, please share your data sample and your desired output so that I could write the dax expression.
Best Regards,
Cherry
Hi @Anonymous ,
Have you solved your problem?
If you have solved, please always accept the replies making sense as solution to your question so that people who may have the same question can get the solution directly.
If you still need help, please feel free to ask.
Best Regards,
Cherry
Hi @Anonymous ,
Have you solved your problem?
If you have solved, please always accept the replies making sense as solution to your question so that people who may have the same question can get the solution directly.
If you still need help, please feel free to ask.
Best Regards,
Cherry
Hi @Anonymous ,
For your requirement, you could refer to this article about how to convert SQL query to DAX firstly.
If you still need help, please share your data sample and your desired output so that I could write the dax expression.
Best Regards,
Cherry
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 | |
95 | |
76 | |
65 | |
51 |
User | Count |
---|---|
146 | |
109 | |
106 | |
88 | |
61 |