Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
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 😄
User | Count |
---|---|
84 | |
76 | |
74 | |
48 | |
39 |
User | Count |
---|---|
114 | |
56 | |
51 | |
42 | |
42 |