Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hello,
First sorry for my english.
I'm a very newby on powerBI but everything becom with a start no ?
I've a table with some column :
- [first] date for when the holiday start ,
- [second] date for when the holiday finish
- [third] who calculate the the day between this two date expect unwork day and weekend, with DAX function (working at this point)
- [forth]one with 3 value (day, amp, pm)
everything is fine but I want to create an other colunn [Five] who say " if [forth} ="day", [Five] = [Third] else [Five] = 0,5 "
For that I've try this :
Do you have an idea to help me ?
Thank you very mush
Solved! Go to Solution.
Hey @dorsey ,
that usually happens when you mix data types.
I guess [third] is number, no? Then try it like this:
Colonne = IF( [forth]="day", [third], 0.5)
Hello,
and thank you for your two help. It's working and it's awsome !!
Nothing for you maybe but for me it's a big start !
regards
Hey @dorsey ,
I'm happy it works now 😊
The beginning is always the hardest. Keep going and things will become more and more easy. And we can always help you here in the community.
Best regards
Denis
Hey @dorsey ,
that usually happens when you mix data types.
I guess [third] is number, no? Then try it like this:
Colonne = IF( [forth]="day", [third], 0.5)
the 2 return paths of an IF statement have to return the same datatype. It looks like the code returns an integer or a string so that's what you need to fix.
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 41 | |
| 39 | |
| 37 | |
| 29 | |
| 24 |
| User | Count |
|---|---|
| 118 | |
| 98 | |
| 70 | |
| 69 | |
| 65 |