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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
deannapi
Frequent Visitor

Select and calculate all dates from slicer

I have a slicer of a date column but every day is on the 1st like

Month-Year
1/1/2023
2/1/2023
3/1/2023
4/1/2023
5/1/2023

So I want the slicer to be a date hierarchy of Year and Month only:

deannapi_0-1708700258116.png

Then I have a measure to calculate a total of a column based off slicer selection, but it's not allowing me to select multple values.

 

 

Online Revenue =
VAR SelDates =
   SELECTEDVALUE( Table[Month-Year] )

VAR Revenue =
   CALCULATE(
      SUM( Table[Revenue] ),
      AND( Table[Month-Year] = SelDates,
           Table[Type] = "Online" ) 
   )

RETURN
Revenue

 

1 ACCEPTED SOLUTION
qqqqqwwwweeerrr
Super User
Super User

Hi @deannapi 

 

you create to measure something like this: replace the correct column name with yours 

 

sum condition = CALCULATE(SUM(data[Ammount]),FILTER(data,data[type]= "Online"))
 
qqqqqwwwweeerrr_0-1708757035536.png

 

Did I answer your question if not please provide more details? if yes please Mark my post as a solution! Appreciate your Kudos!!
Check for more intersing solution here: https://www.youtube.com/@letssolveproblem


Regards

View solution in original post

1 REPLY 1
qqqqqwwwweeerrr
Super User
Super User

Hi @deannapi 

 

you create to measure something like this: replace the correct column name with yours 

 

sum condition = CALCULATE(SUM(data[Ammount]),FILTER(data,data[type]= "Online"))
 
qqqqqwwwweeerrr_0-1708757035536.png

 

Did I answer your question if not please provide more details? if yes please Mark my post as a solution! Appreciate your Kudos!!
Check for more intersing solution here: https://www.youtube.com/@letssolveproblem


Regards

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

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.