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! Request now

Reply
Cosik
Helper I
Helper I

Cumulative value of unique items with filter

Hi,

 

I try to create cumulative line of unique value for selected period.

 

It is next step of this topic https://community.powerbi.com/t5/Desktop/Create-Cumulative-line-from-measure/m-p/1002230#M475697

 

I have this:

 

Totals (Cumulative WOs) =
SUMX (
FILTER ( ALLSELECTED ( 'MDS current' ), 'MDS current'[RFS Week] <= max ('MDS current'[RFS Week]) ),
([Totals (WOs)])
)
 
Where:
 
Totals (WOs) =
COUNTROWS('MDS current')
 
Now I create such measure:
 
Unikatowe WO =
DISTINCTCOUNT('MDS current'[WO #])
 
*MDS current'[WO #] - each fild in this column contain some value
 
When I replace Totals (WOs) in to Unikatowe WO
 
Totals xxx (Cumulative WOs) =
SUMX (
FILTER ( ALLSELECTED ( 'MDS current' ), 'MDS current'[RFS Week] <= max ('MDS current'[RFS Week]) ),
([Unikatowe WO])
)
 
I have still the same Cumulative Value. It looks like the DISTINCTCOUNT is not working.
I compare all result, below you can see the table for selected period:
 
power bi.PNG
1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Cosik , try like

Totals xxx (Cumulative WOs) =
calculate ([Unikatowe WO],
FILTER ( ALLSELECTED ( 'MDS current' ), 'MDS current'[RFS Week] <= max ('MDS current'[RFS Week]) ),

)

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

4 REPLIES 4
amitchandak
Super User
Super User

@Cosik , try like

Totals xxx (Cumulative WOs) =
calculate ([Unikatowe WO],
FILTER ( ALLSELECTED ( 'MDS current' ), 'MDS current'[RFS Week] <= max ('MDS current'[RFS Week]) ),

)

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

Come on, it was so simple?

I don't like it, when the answer is so trivial.

 

Thx for help.

sanimesa
Post Prodigy
Post Prodigy

@CosikCan you try using countrows with values instead of distinctcount and see if it helps? See this article for example:

https://docs.microsoft.com/en-us/dax/values-function-dax

 

=COUNTROWS(VALUES('InternetSales_USD'[SalesOrderNumber]))  

The result it still the same.

Unique value are good but cumulative value is still the same.

 

The synta still don't recognize measure for unique value. 😕

 

I try also add this diractle to Cumulative syntax but is even worse.

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

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!

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
Top Kudoed Authors