• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Same DISTINCTCOUNTNOBLANK measure both in dax and in the added column --- different output?

jutu

Member
Hi,

I have this bar chart visual and one of the bars for May is not showing the label (the rest ok) for some reason even that I can see that there is data on that particular month.

Hence, I tried to create a new column in the relevant table to see if it may come up for May for which I used just the same function/table.
Yet, not only still no labels in that specific bar for May, but also it's counting everything not just distinct values. I know that because i changed the function to COUNT and sure enough all the records are coming up same as the New Column output results.
I am a bit puzzled and can't possibly see what I am doing wrong here. I understand you may don't quite know the reason. Thank you in advance

Letters Sent.Measure = DISTINCTCOUNTNOBLANK('Letters''[CommunicationID])
Letters Sent.New Column = DISTINCTCOUNTNOBLANK('Letters''[CommunicationID])
 
Hey, I have just found out messing around with it that it was just a matter of making the values formatting size to a smaller size ad it appeared it in the missing value bar of May. Still not sure why the output is different if I do the below as a DAX measure and as a New column where the DAX seems to correctly count distinct values but not so when I do the same as a New column in desktop where it seems to sum up all the records rather than just distinct values. Thanks

Letters Sent.Measure = DISTINCTCOUNTNOBLANK('Letters''[CommunicationID])
Letters Sent.New Column = DISTINCTCOUNTNOBLANK('Letters''[CommunicationID])
 
DAX is contextual and will return different result based on what context it's evaluated on.

Measure is evaluated within visual's filter context. Where as calculated column is evaluated on each row's context.
 
Back
Top