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

View all the Fabric Data Days sessions on demand. View schedule

Reply
Anonymous
Not applicable

Apply data segmentation to a cumulative count

Hello

I'm trying to apply a segmentation of data through a visual that respects this DAX filter

S/d acumulado á calculate('Checkin-Chekout'[Tipe]),

filter(all('Checkin-Chekout'),

'Checkin-Chekout'[Fecha .] <'max('Checkin-Chekout'[Fecha .])))
This DAX counts check-in/check-out and aplies a filter that accumulates them by date.
The problem is that when I use the segmentation visual with the 'Checkin-Chekout' column, dosen't show the accumulated count of that hotel by date and that's what I want.
Can someone help me?
Thanks a lot.
1 ACCEPTED SOLUTION
Anonymous
Not applicable

@V-pazhen-msftthis only works when I choose a hotel to filter, not what counts everything. However, you have solved here in another thread of mine with the same problem that I unintentionally duplicated.

But I'm still untrained in how the DAX you wrote in this real thread would fit to show the hole count and not as it did on the blue line

Thanks a lot!

View solution in original post

4 REPLIES 4
amitchandak
Super User
Super User

@Anonymous , Did not get it completely. But it better to move you Date to date table and have that filter there

S/d acumulado á calculate([Tipe],
filter(all('Date'),
'Date'[Fecha .] <max('Date'[Fecha .])))

 

To get the best of the time intelligence function. Make sure you have a date calendar and it has been marked as the date in model view. Also, join it with the date column of your fact/s. Refer :
https://radacad.com/creating-calendar-table-in-power-bi-using-dax-functions
https://www.archerpoint.com/blog/Posts/creating-date-table-power-bi
https://www.sqlbi.com/articles/creating-a-simple-date-table-in-dax/

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
Anonymous
Not applicable

@amitchandak 

Thanks for the answer, but it does not still suits me.

I've created the table acording to the tutorials you gave me, and the DAX it's now like this:

Acumulated s/d = CALCULATE(count('Chekin Checkout'[Type]), 

filter(all('Chekin Checkout'), 'Chekin Checkout'[Type] = "Checkout" ),

filter (all(Dates), Dates[Date] <= max(Dates[Date])))
Earlier before I forgot to add a boolean for the "Check out" cases so i've added it above. The Dates Table still does not solves my problem (it is correctly related with Checkin Checkout table).
My problem is that i want to show the acumulatation of the checkouts globally (i could do this with de DAX above), AND by Hotel with this visual data segmentation by hotel (it is in spanish).
When i click one of those hotels, it does not show me the checkouts acumulations for that hotel (by date) in my line graph; the global number of checkouts is maintained no matter what hotel i choose.
e.g. graph line 
 
 
Anonymous
Not applicable

@Anonymous 

Try add another hotel filter to the dax, something like:

 

Acumulated s/d = CALCULATE(count('Chekin Checkout'[Type]), 

filter(all('Chekin Checkout'), 'Chekin Checkout'[Type] = "Checkout" ), 

filter (all(Dates), Dates[Date] <= max(Dates[Date])),

Filter(all(Chekin Checkout),sumx(filter(Chekin Checkout,earlier(Chekin Checkout[hotel])=Chekin Checkout[hotel]),1))

 

 

Paul Zheng _ Community Support Team
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Anonymous
Not applicable

@V-pazhen-msftthis only works when I choose a hotel to filter, not what counts everything. However, you have solved here in another thread of mine with the same problem that I unintentionally duplicated.

But I'm still untrained in how the DAX you wrote in this real thread would fit to show the hole count and not as it did on the blue line

Thanks a lot!

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