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

Counting Number of Days in Hierarchical Date Slicer

Hello,

 

On one page I have a "between" date slicer and to count the number of days in the selection I made this measure

 

DaysPlanned = COUNTROWS(ALLSELECTED('Date'[Date]))
 
It works fine as you can see:
 
 
PBIDesktop_VmetUufgk8.png

 

When using regular dates and this kind of slicer it still works fine.

 

PBIDesktop_hVEHiJQH3M.png

The problem arises when I'm trying to turn my slicer into a hierarchical slicer. Suddenly I get wrong values.

 

 

PBIDesktop_GnI0qIHe2r.png

 

No matter which element of the slicer I click on I get 214.

 

Any help would be greatly appreciated.

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Anonymous , Try like

COUNTROWS(ALLSELECTED('Date'))
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

2 REPLIES 2
amitchandak
Super User
Super User

@Anonymous , Try like

COUNTROWS(ALLSELECTED('Date'))
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

Thats interesting...

 

Thanks that worked. I am so confused as to why 'Date'[Date] won't work but 'Date' does.

 

Any insight why? @amitchandak 

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