Forum Discussion
Is this a bug?
Nishantjain , first of all, the data type is indeed in date/time.
Second, see below printscreens of an example why, to my opinion, it should show the correct data.
If you know of a test I could do, or you v-danhe-msft , I can give it a try to see if something else is wrong.
I can see that there is something wrong with your data.
- In the first screenshot, you can see the correct year in "Measure 4" against group 11666 i.e 2017
- However, in you second screenshot, "Measure 4" is blank. Assuming that "Measure 4" is the same in both the screenshot, I expect to see a year again business group 10-010-CMR but it is blank. So, if the year is blank, then your "Measure 3" will given -1.
Assuming I have understood your screenshots correctly, the dax function is doing what it is expected to do.
Also, the 2 screenshots are showing different business groups. Can you try to create a screenshot where "Measure 4" has 2017 ( or anothe year) and "Measure 3" is showing -1 against the same business group
Thanks
- DouweMeer7 years agoImpactful Individual
Fair enough. Here is the same scenario with the same data.
And yes, all columns contain the same measures/ data as before Measure 3 was added.
But you say this is how DAX works. How can a 2nd measure in the same matrix influence results of another measure? I've never seen this happen before. Not even with more complicated filter usages. Even the non measure columns are affected by 'Measure 3'.
- Nishantjain7 years agoContinued Contributor
The reason Measure 3 is giving -1, is becuase Measure 4 is blank. You need to find out why Measure 4 is blank.
Most likely, the max function you are using in Measure 4 is returning blank. I don't know why this is happening without looking at your dataset.
One thing you can do is to use the isblank function in measure 3 to check if measure 4 is blank. If it is, then return a blank. This way you can avoid getting -1
Measure 3 = if(isblank([Measure 4]), blank(), year([Measure 4]))
Hope this helps
Nishant- DouweMeer7 years agoImpactful Individual
Both Measure 3 and Measure 4 don't point towards each other. The printscreen where Measure 3 is included has the exact same dataset, measure, visuals as the one that does not have Measure 3. The only thing I do, is drag in 'Measure 3' into the visual.
This simply should not happen.