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

The FabCon + SQLCon recap series starts April 14th at 8am Pacific. If you’re tracking where AI is going inside Fabric, this first session is a can't miss. Register now

Reply
kylerwimbush
Helper I
Helper I

If Date Slicer is ALL...

I am trying to create a measure that will display the value of another measure divided by 53 based on the value of the date slicer. 

kylerwimbush_0-1665432976671.png

I want it to divide [EscCountAverage] by 53 if the date slicer is showing data for all weeks. But what I have now wont work because it cant convert the text string to a number. Maybe I am going about this the wrong way? Any help? 

 

1 ACCEPTED SOLUTION
Shaurya
Memorable Member
Memorable Member

Hi @kylerwimbush,

 

This should do it:

 

DateSlicerAll = IF(IF(SELECTEDVALUE('Date'[Date]),SUM('Date'[Week Number]),SUM('Date'[Week Number]))=10011, [Sum]/53, [Sum])

 

Case when all dates are selected, you get 15 divided 53.

 

Screenshot 2022-10-11 023803.jpg

 

For any other selection, you get 15.

 

Screenshot 2022-10-11 023833.jpg

 

Works for you? Mark this post as a solution if it does!

View solution in original post

4 REPLIES 4
Ashish_Mathur
Super User
Super User

Hi,

Assuming EscCountAverage is a measure you have written, try this measure

=if(selectedvalue('Calendar Table'[Week])="All",divide([EscCountAverage],53),[EscCountAverage])

Hope this helps.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
Shaurya
Memorable Member
Memorable Member

Hi @kylerwimbush,

 

This should do it:

 

DateSlicerAll = IF(IF(SELECTEDVALUE('Date'[Date]),SUM('Date'[Week Number]),SUM('Date'[Week Number]))=10011, [Sum]/53, [Sum])

 

Case when all dates are selected, you get 15 divided 53.

 

Screenshot 2022-10-11 023803.jpg

 

For any other selection, you get 15.

 

Screenshot 2022-10-11 023833.jpg

 

Works for you? Mark this post as a solution if it does!

Had to switch up the values but once I did that it worked! Thanks, you are a big help. 

aj1973
Community Champion
Community Champion

Hi @kylerwimbush 

Can you share a sample of your PBIX please?

Regards
Amine Jerbi

If I answered your question, please mark this thread as accepted
and you can follow me on
My Website, LinkedIn and Facebook

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.