Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
Hello all,
I have a table with account number, balance, transaction date, and correspondance date. In my report I have a time slicer for the transaction date, so users can see balances for the account that have transation in a date range. This works fine, but I would like to create another measure, in which I would like to use the same range in the transaction date in the correspondence date.
Is there a way to capture the date range from the transaction column (Time Slicer) in a variable and use it in a different measure for the corresponance date?
Solved! Go to Solution.
Hi @mosman ,
You can create measure to get the date range like DAX below:
Date range= Var MinDate = CALCULATE(MIN(Table1[transaction date]),ALLSELECTED(Table1[transaction date])) Var MaxDate = CALCULATE(MAX(Table1[transaction date]),ALLSELECTED(Table1[transaction date])) Return DATEDIFF(MinDate, MAXDate, DAY)
Best Regards,
Amy
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @mosman ,
Does that make sense? If so, kindly mark the proper reply as a solution to help others having the similar issue and close the case. If not, let me know and I'll try to help you further.
Best regards
Amy
Hi @mosman ,
You can create measure to get the date range like DAX below:
Date range= Var MinDate = CALCULATE(MIN(Table1[transaction date]),ALLSELECTED(Table1[transaction date])) Var MaxDate = CALCULATE(MAX(Table1[transaction date]),ALLSELECTED(Table1[transaction date])) Return DATEDIFF(MinDate, MAXDate, DAY)
Best Regards,
Amy
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Refer to this. You have to create an inactive join and activate it as per need. (Not exact but similar)
So you will relation with both dates with the same Date/time table.
One join will be an inactive correspondence date.
Activate correspondence date in a formula using use relation.
Appreciate your Kudos. In case, this is the solution you are looking for, mark it as the Solution. In case it does not help, please provide additional information and mark me with @
Thanks.
Min max can be taken
Change Date End = Var _endDate= Maxx(ALLSELECTED('Date'[Date Filer]),ENDOFMONTH('Date'[Date Filer])) Var _start_date= minx(ALLSELECTED('Date'[Date Filer]),'Date'[Date Filer])) return _endDate & " " & _start_date
User | Count |
---|---|
140 | |
113 | |
104 | |
76 | |
63 |
User | Count |
---|---|
135 | |
126 | |
110 | |
70 | |
61 |