Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
miltenburger
Helper V
Helper V

Unique users with costs per month by selected filters

Hi Guys,

 

I'm trying to measure and show all my clients who made costs in a selected period. 

The thing i've got now, is that it only shows me the grand total over my selected period, instead of the differences in months.

 

Measures i've made:

Sum of cost = 
CALCULATE(
    SUM('Fact.VoorzieningZINBesteding'[Kosten ZIN]),
    FILTER(
        ALLSELECTED('Fact.VoorzieningZINBesteding'),
        'Fact.VoorzieningZINBesteding'[BSN Gepseudonimiseerd] = SELECTEDVALUE('Fact.VoorzieningZINBesteding'[BSN Gepseudonimiseerd])))

 

 

Cliënten met kosten = CALCULATE(DISTINCTCOUNT('Fact.VoorzieningZINBesteding'[BSN Gepseudonimiseerd]), filter (ALLSELECTED('Fact.VoorzieningZINBesteding'), 'Fact.VoorzieningZINBesteding'[Sum of cost] > 0 ))

 

 

Result:

Costs.PNG

 

What I expect (this is other example, not the measure as shown before)

result.PNG

 

 

 

 

 

 

 

 

 

Got any ideas on how to achieve this? Thx in advance

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@miltenburger , As per me the measure should be

 

divide(SUM('Fact.VoorzieningZINBesteding'[Kosten ZIN]),DISTINCTCOUNT('Fact.VoorzieningZINBesteding'[BSN Gepseudonimiseerd]))

 

You need handle the selected value if tables are not joined or not from same table

 

you can use allselected in denominator if you want all users

 

If this does not help
Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

1 REPLY 1
amitchandak
Super User
Super User

@miltenburger , As per me the measure should be

 

divide(SUM('Fact.VoorzieningZINBesteding'[Kosten ZIN]),DISTINCTCOUNT('Fact.VoorzieningZINBesteding'[BSN Gepseudonimiseerd]))

 

You need handle the selected value if tables are not joined or not from same table

 

you can use allselected in denominator if you want all users

 

If this does not help
Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors