question

PBIMDX-5736 avatar image
0 Votes"
PBIMDX-5736 asked SeeyaXi-msft commented

Need help to convert an SQL query to DAX

select
cm.id,
case when CM.Manager=PM.Manager
then PM.Manager
else CM.Manager // in this part I would like to give it a differnt color if it was different value
End as Calc_Manager,
case when CM.Budget=PM.Budget
then PM.Budget
else CM.Budget // in this part I would like to give it a differnt color if it was different value
End as Calc_Budget

from (select from TestChange where month(InTime)=9) CM
join (select
from TestChange where month(InTime)=8) PM
on PM.ID=CM.ID;

The data is like this in the table

ID InTime dept Manager Budget
101 2021-08-29 Dept1 Manager1 100000
101 2021-09-29 Dept1 Manager2 200000
102 2021-08-29 Dept2 Manager1 105000
102 2021-09-29 Dept2 Manager2 220000
103 2021-08-29 Dept3 Manager1 100000
103 2021-09-29 Dept3 Manager1 150000

if the data is different for two dates the field should be highlighted. Can anyone help on that :)

sql-server-general
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi @PBIMDX-5736,

Welcome to Microsoft Q&A!
Your question seems to be related to PowerBI. You can repost your question on the PowerBI forum.
Here is their forum: https://community.powerbi.com/
Hope your problem could be solved!

Best regards,
Seeya

0 Votes 0 ·

0 Answers