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.
Hello guys,
I have following table
month |
1 |
2 |
3 |
4 |
5 |
6 |
And I need to create measure that will return count of month and not be affected by selection/filter of months, I create this DAX formula, but for unknown reason it is not working, any reason why? and what should be correct syntax ?
measure= CALCULATE(DISTINCTCOUNT(Table[month]),ALL(Table,Table[month])))
Solved! Go to Solution.
You set a filter on Date column so use one of these:
If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
LinkedIn: www.linkedin.com/in/vahid-dm/
HI @Petr__
Try this:
measure= CALCULATE(DISTINCTCOUNT(Table[month]),ALL(Table[month]))
If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
LinkedIn: www.linkedin.com/in/vahid-dm/
Hell @Vahid this is what I mentioned in 2nd post (I have typo here with ")") but it doesn t work
Can you share you PBIX file?
or try this if you set a filter on month and you want to ignore that:
measure =
CALCULATE ( DISTINCTCOUNT ( Table[Month] ), REMOVEFILTERS ( Table[Month] ) )
If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
LinkedIn: www.linkedin.com/in/vahid-dm/
@VahidDM got it...I was filtering on the different column than filter was set up in the report
You set a filter on Date column so use one of these:
If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
LinkedIn: www.linkedin.com/in/vahid-dm/
Also find it, few minutes after you 😄 kudos sent 🙂
I also tried
measure
User | Count |
---|---|
17 | |
16 | |
14 | |
13 | |
12 |
User | Count |
---|---|
17 | |
14 | |
12 | |
10 | |
9 |