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.
To convert the following tableau calculated field to Power BI Dax, which I faced issue while doing this.
STR(if year(TODAY()) = year([Calender]) and month(TODAY())= MONTH(Calender]]) then 1
elseif year(TODAY()) = year(Calender]) and
(month(TODAY())- MONTH(Calender])) >=0 then 1
elseif year(TODAY())-1 = year(Calender]) and
(month(TODAY())- MONTH(Calender])) < 0 then 1
else 0 end)
Help with this is really appreciated.
Thanks in advance
Solved! Go to Solution.
@asdf1608 ,Assuming calendar is name of date column, a new column like
Switch( True() ,
year(TODAY()) = year([Calender]) && month(TODAY())= MONTH(Calender]]), 1
year(TODAY()) = year(Calender]) && (month(TODAY())- MONTH(Calender])) >=0 ,1
year(TODAY())-1 = year(Calender]) && (month(TODAY())- MONTH(Calender])),1,0)
@asdf1608 ,Assuming calendar is name of date column, a new column like
Switch( True() ,
year(TODAY()) = year([Calender]) && month(TODAY())= MONTH(Calender]]), 1
year(TODAY()) = year(Calender]) && (month(TODAY())- MONTH(Calender])) >=0 ,1
year(TODAY())-1 = year(Calender]) && (month(TODAY())- MONTH(Calender])),1,0)
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
17 | |
10 | |
10 | |
8 | |
6 |
User | Count |
---|---|
18 | |
16 | |
15 | |
12 | |
10 |