The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.
Hello,
Solved! Go to Solution.
https://community.powerbi.com/t5/Community-Blog/Excel-to-DAX-Translation/ba-p/1060991
The DAX functions are identical to the Excel functions in your case, so:
Column =
IF(ISNUMBER([Column K]),
[Column K] - [Column J],
IF([Column J] > TODAY(),
"",
TODAY() - [Column J]
)
)
@Anonymous , if J is number that it can not be compared with today and if it is then you need to return same type data
try like
Column =
IF(isnumber([Column K]),
[Column K] - [Column J],
IF([Column J] > TODAY(),
blank(),
datediff(TODAY() , [Column J], day)
)
)
@amitchandak thank you , Its good to know that I can use excel funtion on power BI, but I am getting an error both my date colunms are formatted to date. Not sure why is that. Any Idea?
Not sure what this is translating to spanish. hopefully you can see it english
@Anonymous
please try this
Column = if(ISNUMBER('Table'[record date]),'Table'[record date]-'Table'[date],if('Table'[date]>today(),blank(),today()-'Table'[date]))
Proud to be a Super User!
@ryan_mayu Thank you, but I am getting error. Please see below if you know anything
https://community.powerbi.com/t5/Community-Blog/Excel-to-DAX-Translation/ba-p/1060991
The DAX functions are identical to the Excel functions in your case, so:
Column =
IF(ISNUMBER([Column K]),
[Column K] - [Column J],
IF([Column J] > TODAY(),
"",
TODAY() - [Column J]
)
)
@Greg_Deckler Good to know that I can use excel funtion, but i ma getting an error when I do that. (Both my Due Date and Actual Delivary Date are on Date format). I am not sure what is variant-type cannot be used. Any idea? Thank you
@Anonymous - Yes, you will need to either always return text or numbers. You formula returns text sometimes and numbers other times, that is not allowed in DAX. So you can either replace your "Other" with 0 or some other number.
User | Count |
---|---|
56 | |
54 | |
54 | |
49 | |
30 |
User | Count |
---|---|
173 | |
89 | |
70 | |
46 | |
45 |