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

Data Days is here! Join us now for 60+ days of learning, challenges, and connection. 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
Fabric Data Days is here Carousel

Fabric Data Days 2026

Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.

May Power BI Update Carousel

Power BI Monthly Update - May 2026

Check out the May 2026 Power BI update to learn about new features.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.