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..
Totalsales = SUM([Sales])
VAR lastdatesvalues = CALCULATE(SUM([Sales]),LASTDATE(Date table))
VAR selected date = IF(ISFITHERED(Date table),
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
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] )
I want total sales on card when i select "Select All" option in slicer.
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
Values on selection = IF ( ISFILTERED ( Sheet1[Date] ), SUM ( Sheet1[Value] ), SUMX ( TOPN ( 1, Sheet1, Sheet1[Date] ), Sheet1[Value] ) )
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
@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.
Check out the November 2023 Power BI update to learn about new features.
Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.
130+ sessions, 130+ speakers, Product managers, MVPs, and experts. All about Power BI and Fabric. Attend online or watch the recordings.