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
yve214
Helper III
Helper III

How to get fixed values without aggregating

Assuming I modeled my fact table to my date table through the date and fact_table date column, how can I calculate say the qty for just that specific date (week end date Sunday only) without aggregating for the entire period for instance.

 

Data

ProductDateQty
a1/3/2022100
a1/4/2022150
a1/9/2022175
b1/10/2022200
b1/11/2022150
b1/16/2022105

 

Current Results (aggregating by default on weekend dates - Sundays):

ProductDateQty
a1/5/2022425
b1/16/2022455

 

Please my expected Results if I were to select only weekend dates (Sundays). These fixed numbers only for these dates.

ProductDateQty
a1/5/2022175
b1/16/2022105

 

Thank you for your help.

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@yve214 , You can create a flag for that and use that in filter

new column

Weekend = if(Weekday([Date],2) =7,1,0)

 

new measure =

calculate(sum(Table[Qty]), filter(Table, Table[Weekend ] =1))

 

or , without new column

 

calculate(sum(Table[Qty]), filter(Table, Weekday([Date],2) =7))

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
yve214
Helper III
Helper III

@amitchandak Oh my, it was such a long day. and I dont know how I didnt think of an option like this, such a lightbulb, thank you very much.

amitchandak
Super User
Super User

@yve214 , You can create a flag for that and use that in filter

new column

Weekend = if(Weekday([Date],2) =7,1,0)

 

new measure =

calculate(sum(Table[Qty]), filter(Table, Table[Weekend ] =1))

 

or , without new column

 

calculate(sum(Table[Qty]), filter(Table, Weekday([Date],2) =7))

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

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.