- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Help with dax!
I want if select all is selected in date slicer it should show total sales for all dates, if no date selected it should show last date sales in date column and id any specific date selected it should show sales for that date.
There is no string "select all" in date column. And we can't compare date with string.
these are limitations please give proper result..
with the above formula I am able to achieve if no date selected it should show last date sales in date column and id any specific date selected it should show sales for that date.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Totalsales = SUM([Sales])
VAR lastdatesvalues = CALCULATE(SUM([Sales]),LASTDATE(Date table))
VAR selected date = IF(ISFITHERED(Date table),
IF(Date table)=BLANK(),lastdates),SUM([Sale]))
RETURN
Totalsales
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @Angads
Please try
Values on selection =
SUMX ( TOPN ( 1, Sheet1, Sheet1[Date] ), Sheet1[Value] )
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Its giving me sales for selected date only. I am not getting answer for multiple dates select with above formuale also I want total sales when I select "select all" option in slicer. @tamerj1
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@Angads
Better to present a sample with the expected results as this new explanation does not match with the first one. If I follow your new explanation literally then just use SUM ( Sheet1[Value] )
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I want total sales on card when i select "Select All" option in slicer.
or
if no date selected it should show last date sales in date column and id any specific date selected it should show sales for that dates. @tamerj1
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@Angads
Please try
Values on selection =
IF (
ISFILTERED ( Sheet1[Date] ),
SUM ( Sheet1[Value] ),
SUMX ( TOPN ( 1, Sheet1, Sheet1[Date] ), Sheet1[Value] )
)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Its giving same result as of my formula but not giving Total sales on selecting "select all".
other two conditions are met but not the select all one! @tamerj1
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@Angads
Are you using a custom visual slicer?
Normal slicer seems to interact normally with the ISFILTERED funtion
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
What when Select all is also there in the slicer! That time its not working! @tamerj1
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@Angads
You are right, "Select All" is different than selecting all items one by one but it behaves exactly the same as nothing is selected. It does not seem to be any way to distinguish between the two scenarios.
@Greg_Deckler any ideas?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@tamerj1 Unfortunately no. Using the "Select all" feature simply behaves differently than individually selecting all of the items. It's the same as not selecting anything. I do not know of any way to distinguish between the two.
Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!: Power BI Cookbook Third Edition (Color)
DAX is easy, CALCULATE makes DAX hard...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

Helpful resources
Join our Fabric User Panel
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Power BI Monthly Update - June 2025
Check out the June 2025 Power BI update to learn about new features.

Subject | Author | Posted | |
---|---|---|---|
06-04-2025 07:54 PM | |||
05-27-2025 04:44 PM | |||
05-27-2025 07:53 PM | |||
06-18-2025 11:25 PM | |||
07-03-2024 07:46 AM |
User | Count |
---|---|
10 | |
8 | |
8 | |
8 | |
6 |
User | Count |
---|---|
14 | |
12 | |
11 | |
10 | |
9 |