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

Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.

Reply
Guyakobov
Helper II
Helper II

' AND' option between 2 dates columns

HI,

 

I have 2 tables, one is accounts and their 'creation' date and the other is account's transactions and the approval date of each transaction.

 

I would like to calculate the sum of transactions of accounts that created and their transaction approved in the date range that ill choose.

 

in simple code it's like this: 

 

date(mt.Lv_ApprovedOn) between date(date_range_start) and date(date_range_end)  and date(ac.createdon) between date(date_range_start) and date(date_range_end)

 

Thanks 

 

 

5 REPLIES 5
v-piga-msft
Resident Rockstar
Resident Rockstar

Hi @Guyakobov ,

 

To understand your scenario better, please share your data sample and your desired output so that we could help futher on it.

 

Reference:

 

How to Get Your Question Answered Quickly

 

Best  Regards,

Cherry

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

HI,

 

The data sample is here https://prnt.sc/msjsfn - you can see in that table that we have one account that was created in July and did a few transactions in July and more transactions after. so, if ill choose in my date filter all of July I suppose to see only the accounts that were created ON July and the transaction that was approved on July cause this is the time frame that I chose.

 

and i want it to be like this http://prntscr.com/mt30le 

Hi @Guyakobov ,

 

Based on your information, it seems that you have a slicer and you want to show the sum of count based on the selected month?

 

If it is, I'm afraid that you just create the measure like below and then you will get the result.

 

Measure = CALCULATE(SUM('Table1'[Count]),ALLSELECTED(Table1))

Capture.PNG

 

If you still need help, please share more sample data which could reproduce your scenario so that we can help further on it.

 

Best  Regards,

Cherry

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

HI,

 

The slicer is date range by days http://prntscr.com/mtif8x . so for example, if ill choose in my date range 20/7/18 till 30/07/18 I shouldn't see any information because the account was created on the 9/07/18.

the date slicer needs to consider both 'created on' dates and 'approved on' dates.

 

Thanks 

HI,

 

You can see in the table attached (http://prntscr.com/msjsfn)  that we have an account ('lv_account') and we can see all of his transactions ('count') and their approval date ('lv_approvedon'). in the last column ('deposit reg.createdon') we have the date that the accounts were created.

 

I want to choose, for example, July data, and I would like to receive all the accounts that were created on July and get their transactions in that same time frame that I choose ( July in our example).

 

The transactions that supped to appear are highlights in the picture.

 

Regards  

Helpful resources

Announcements
October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 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.

Top Kudoed Authors