Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
I am trying to calculate list of documents which are Due in Next 30 days (Including Today).
Tried multiple ways however not getting the correct numbers. Can you please correct me ?
The condition is either [Due In Date] OR [Forecast Submission Date] should be in next 30 days and I am trying the below DAX.
Documents due in next 30 days =
CALCULATE (
[Total Documents],
FILTER ( 'Merged Table', 'Merged Table'[Actual In] = BLANK () ),
OR (
DATESBETWEEN ('Merged Table'[Due In Date], TODAY (), TODAY () + 30 ),
DATESBETWEEN ('Merged Table'[Forecast Submission Date], TODAY (), TODAY () + 30 )
)
Solved! Go to Solution.
pls try this
Documents due in next 30 days =
VAR _toDay = TODAY ()
VAR _End = _toDay+30
RETURN
CALCULATE (
[Total Documents],
ALL('Merged Table'),
'Merged Table'[Actual In] = BLANK () ,
OR (
'Merged Table'[Due In Date]>=,_toDay&& () 'Merged Table'[Due In Date]<=_End,
'Merged Table'[Forecast Submission Date]>=,_toDay&& () 'Merged Table'[Forecast Submission Date]<=_End
)
-------OR-----
Documents due in next 30 days =
VAR _toDay = TODAY ()
VAR _End = _toDay+30
RETURN
CALCULATE (
[Total Documents],
'Merged Table'[Actual In] = BLANK () ,
OR (
'Merged Table'[Due In Date]>=,_toDay&& () 'Merged Table'[Due In Date]<=_End,
'Merged Table'[Forecast Submission Date]>=,_toDay&& () 'Merged Table'[Forecast Submission Date]<=_End
)
pls try this
Documents due in next 30 days =
VAR _toDay = TODAY ()
VAR _End = _toDay+30
RETURN
CALCULATE (
[Total Documents],
ALL('Merged Table'),
'Merged Table'[Actual In] = BLANK () ,
OR (
'Merged Table'[Due In Date]>=,_toDay&& () 'Merged Table'[Due In Date]<=_End,
'Merged Table'[Forecast Submission Date]>=,_toDay&& () 'Merged Table'[Forecast Submission Date]<=_End
)
-------OR-----
Documents due in next 30 days =
VAR _toDay = TODAY ()
VAR _End = _toDay+30
RETURN
CALCULATE (
[Total Documents],
'Merged Table'[Actual In] = BLANK () ,
OR (
'Merged Table'[Due In Date]>=,_toDay&& () 'Merged Table'[Due In Date]<=_End,
'Merged Table'[Forecast Submission Date]>=,_toDay&& () 'Merged Table'[Forecast Submission Date]<=_End
)
Hi @Ahmedx ,
Your second solution is right and is working well.
However, there is another requirement now in the same DAX is below-
Latest of (Forecast Date > today +30 and Forecast date <= today+30) and (Due in Date > today+30 and Due in date <= today+30)
We need to consider the Latest of either Forecast Date OR DueIn Date.
I don’t understand, but this is a new question, create a new topic and explain in detail what you need and expect the result
you mean that today it will be + 30
this
Could you shre the data model so we can adapt the formula, because it works on my fake table ?
If you want to Count you could use this :
Hello @Anonymous ,
I tried to create a calculated column in a table and putted Yes if need to be process and No if not, then you can filter it on visual
Formula:
Appreciate your effort however, this doesn't work.
Need to show how many are due in next 30 days i.e. Count Of Documents
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
108 | |
105 | |
88 | |
74 | |
66 |
User | Count |
---|---|
126 | |
111 | |
100 | |
83 | |
71 |