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
Liklikadze
Regular Visitor

SQL statment

Hi i'm trying to implement this Sql statment in power bi  SUM(amount * coeff) where tdate < calendar[date] 

So basicly amount, coeff and tdate are in one table and caledar[date] is another table no luck in querry edittor and also in creating new mesure.

33.PNG

1 ACCEPTED SOLUTION
v-eachen-msft
Community Support
Community Support

Hi @Liklikadze ,

 

If you want a column to do it, you could refer to the following DAX:

 

Column = 
'Table'[amount]*'Table'[coeff]

 

Then create relationship between this table and calendar table based on date column.

Now you could use SUM() function or set it in the field to get the result. And you could use date as a slicer to filter the data.

1-1.PNG

 

Community Support Team _ Eads
If this post helps, then please consider Accept it as the solution to help the other members find it.

View solution in original post

2 REPLIES 2
v-eachen-msft
Community Support
Community Support

Hi @Liklikadze ,

 

If you want a column to do it, you could refer to the following DAX:

 

Column = 
'Table'[amount]*'Table'[coeff]

 

Then create relationship between this table and calendar table based on date column.

Now you could use SUM() function or set it in the field to get the result. And you could use date as a slicer to filter the data.

1-1.PNG

 

Community Support Team _ Eads
If this post helps, then please consider Accept it as the solution to help the other members find it.
amitchandak
Super User
Super User

what is expected value of calendar date when you want to say tdate < calendar[date] 

 

For measure

calculate(SUMX(table,table[amount] *table[coeff]),filter(table,table[tdate] < max(calendar[date] ))

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!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.

Top Solution Authors