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.
I creating a scorecard for suppliers and try create 2 measures:
1. counting distinct occurance in last month
2 counting distinct occurances in last 6 months.
Dax formula will be similar just cant get it to work.
My table colums are:
Any help would be greatly appreciated.
Solved! Go to Solution.
Hi,
I tried to create a sample pbix file like below.
If your datamodel does not have dim-date-column, try using some DAX functions like below.
Last six months distinct category count: =
VAR _currentmonth =
EOMONTH ( TODAY (), 0 )
VAR _startingmonth =
EOMONTH ( TODAY (), -6 ) + 1
RETURN
CALCULATE (
DISTINCTCOUNT ( Data[Category] ),
Data[Date] <= _currentmonth,
Data[Date] >= _startingmonth
)
If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.
Schedule a short Teams meeting to discuss your question
Hi,
I tried to create a sample pbix file like below.
If your datamodel does not have dim-date-column, try using some DAX functions like below.
Last six months distinct category count: =
VAR _currentmonth =
EOMONTH ( TODAY (), 0 )
VAR _startingmonth =
EOMONTH ( TODAY (), -6 ) + 1
RETURN
CALCULATE (
DISTINCTCOUNT ( Data[Category] ),
Data[Date] <= _currentmonth,
Data[Date] >= _startingmonth
)
If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.
Schedule a short Teams meeting to discuss your question
This is perfect! Thank you.
Depending on the count I want to assign a score. Is is better to do it in the same measure or do you create seperate measre?
0 NCM = 100/100 (assigned score) |
1 NCMs = 75/100 |
2 NCMs = 50/100 |
3+ NCMs = 0/100 |
Hi,
Thank you for your feedback.
I think it depends on how you want to create a visualization.
If you want to show it one by one in a card visualization, you can separately create each measure.
If you want to show it by a bar chart, for instance, 0,1,2,+3 are the component of the axis and you have to create an axis table separately, and use one measure to show them as a bar chart.
I hope this helps.
Thanks.
If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.
Schedule a short Teams meeting to discuss your question
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
15 | |
10 | |
10 | |
10 | |
10 |
User | Count |
---|---|
19 | |
14 | |
13 | |
11 | |
8 |