Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code FABINSIDER for a $400 discount.
Register nowGet inspired! Check out the entries from the Power BI DataViz World Championships preliminary rounds and give kudos to your favorites. View the vizzies.
Situation 1 - Column in Whole Number but have 0 in it. (refer picture 1 below)Issue 1 - Column in Whole Number but have 0 in it.
Issue - When divide the whole number to day, month, and year, the month column cannot change to whole number format, can only remain in text format. (Picture 2 below)Issue 2 - When divide the whole number to day, month, and year, the month column cannot change to whole number format, can only remain in text format.
Method 1 - NOK, tried to do it using DAX, same DAX works with T1RPRD Column but not with T1DELD column. The difference between these 2 columns are T1DELD have 0 while T1RPRD dont have 0 in it. (Picture 3 below)Method 1 - NOK, tried to do it using DAX, same DAX works with T1RPRD Column but not with T1DELD column. The difference between these 2 columns are T1DELD have 0 while T1RPRD dont have 0 in it.
Method 2 - NOK, Tried using formula DATE by combining Column Day T1DELD, Month T1DELD, and year T1DELD but not working as only the column Month T1DELD is in text format, others are in whole number format. (Picture 4 below)Method 2 - NOK, Tried using formula DATE by combining Column Day T1DELD, Month T1DELD, and year T1DELD but not working as only the column Month T1DELD is in text format, others are in whole number format.
Method 3 - NOK, Using directly formula substract 2 column with text format to produce vehicle age in days are totally and obviously wrong. (Picture 5 below)Method 3 - NOK, Using directly formula substract 2 column with text format to produce vehicle age in days are totally and obviously wrong.
Expected Result - Exactly like Picture 3, column T1RPRD, eg from whole number 20180629 to date 26/06/2018.
Please help me dear comunity, I am stuck.
Solved! Go to Solution.
In your method 1, you can remove the zeros to blanks during the transformation and then transform the column to date.
or if you want to keep the zero's then use iferror to exclude zeros in your measure or column
In this case a blank is equal to null, I am not and expert, but in my own experiense I have ran into situation where blanks to not act like null value. That would be a whole different topic that you can research.
In your method 1, you can remove the zeros to blanks during the transformation and then transform the column to date.
or if you want to keep the zero's then use iferror to exclude zeros in your measure or column
IT WORKS! Again thank you soo much how you have help me solve my issue, how grateful I am for that!Solved! for the non-zero part!
You can't keep the zero but you can replace it with another date value. That you would know represents a zero
Ahh i see~ I think I would keep it as it is but just wondering tho, BLANK() is equal to NULL? Thank you soo much 😄
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the February 2025 Power BI update to learn about new features.
User | Count |
---|---|
88 | |
77 | |
58 | |
42 | |
38 |
User | Count |
---|---|
116 | |
81 | |
81 | |
50 | |
39 |