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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

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
July PBI25 Carousel

Power BI Monthly Update - July 2025

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

Join our Fabric User Panel

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.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.