Forum Discussion
ADOalan1
3 years agoFrequent Visitor
Help with Dax formula
Hi,
I have the below DAX to givem e back first, second, third payment date but looking at the row highlighted I need to stop if let's say are only two dates so that the third payment date will be empty.
I need to add the additional code to this dax.
Any help will be much apprecaited
Thanks
2 Replies
- AnonymousNot applicable
Hi ADOalan1
You can try the following code
Date 3 = VAR _top3 = TOPN ( 3, nfp_donation, nfp_donation[Income Date], ASC ) VAR _count = COUNTROWS ( SUMMARIZE ( _top3, nfp_donation[Income Date] ) ) RETURN IF ( _count > 2, IF ( HASONEVALUE ( nfp_donation[Form ID] ), MAXX ( _top3, nfp_donation[Income Date] ) ) )Best Regards!
Yolo Zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- Ashish_Mathur
Super User
Hi,
Share some data, describe the question and show the expected result.