Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
I have a slicer in PowerBI which I can select multiple months.
I added a Card in PowerBI with the "Month" selected and choose (Count Distinct). When I select multiple months in the slicer, PowerBI returns the exact count of months that I selected. If I choose August, September, October, the count is "3" just as expected.
I need to create a Column that multiplies "130 * DISTINCTCOUNT(ImportCubicPM[Month]"
test = CALCULATE(130 * ( DISTINCTCOUNT(ImportCubicPM[Month])))
If 2 months are selected by the slicer then the total should be 260.
The code above is not calculating properly. The numbers are off a little bit.
I am not sure if I should be using DISTINCTCOUNT
Any help would be greatly appreciated.
Thanks, Mike
Solved! Go to Solution.
Hi,
What result do you get with this?
=130*DISTINCTCOUNT(ImportCubicPM[Month])
@morther wrote:
I have a slicer in PowerBI which I can select multiple months.
I added a Card in PowerBI with the "Month" selected and choose (Count Distinct). When I select multiple months in the slicer, PowerBI returns the exact count of months that I selected. If I choose August, September, October, the count is "3" just as expected.
I need to create a Column that multiplies "130 * DISTINCTCOUNT(ImportCubicPM[Month]"
test = CALCULATE(130 * ( DISTINCTCOUNT(ImportCubicPM[Month])))
If 2 months are selected by the slicer then the total should be 260.
The code above is not calculating properly. The numbers are off a little bit.
I am not sure if I should be using DISTINCTCOUNT
Any help would be greatly appreciated.
Thanks, Mike
The DAX measure shall work If it is a measure. If you actually created a "Column" in your case, try to create a measure instead. Otherwise, for further suggestion, please post more sample data of your case. Or even better you can upload the pbix file to Onedrive/Google drive and share the link.
@morther wrote:
I have a slicer in PowerBI which I can select multiple months.
I added a Card in PowerBI with the "Month" selected and choose (Count Distinct). When I select multiple months in the slicer, PowerBI returns the exact count of months that I selected. If I choose August, September, October, the count is "3" just as expected.
I need to create a Column that multiplies "130 * DISTINCTCOUNT(ImportCubicPM[Month]"
test = CALCULATE(130 * ( DISTINCTCOUNT(ImportCubicPM[Month])))
If 2 months are selected by the slicer then the total should be 260.
The code above is not calculating properly. The numbers are off a little bit.
I am not sure if I should be using DISTINCTCOUNT
Any help would be greatly appreciated.
Thanks, Mike
The DAX measure shall work If it is a measure. If you actually created a "Column" in your case, try to create a measure instead. Otherwise, for further suggestion, please post more sample data of your case. Or even better you can upload the pbix file to Onedrive/Google drive and share the link.
Oh my goodness, I thought I had tried that yesterday but could not get it to accept the query as a measure.
This worked as a measure. Thank you so much.
Measure = 130*DISTINCTCOUNT(ImportCubicPM[Month])
Hi @morther,
I do not know whom you are replying to but that is exactly what my suggestion was.
Hi,
What result do you get with this?
=130*DISTINCTCOUNT(ImportCubicPM[Month])
Oh my goodness, that was my bad. This was exactly the answer.
Measure = 130*DISTINCTCOUNT(ImportCubicPM[Month])
I was doing this as a column, but when I changed it to a measure it worked as expected.
I am sorry for not giving credit where credit was due.
Mike
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
72 | |
71 | |
37 | |
31 | |
27 |
User | Count |
---|---|
91 | |
49 | |
45 | |
38 | |
36 |