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.
Hi, I have 2 tables, notes and payments. I am trying to see which notes had a payment date after the note date Here is the sample model: Sample File
Here is what I want it to look like. I am dealing 10million+ rows so if possible in an efficient measure. Thank you!!
Solved! Go to Solution.
Hi, @PowerBI123456
You may create a calculated column and measures as below. The pbix file is attached in the end.
Calculated column:
Flag Column =
var postdate =
CALCULATE(
MAX('FACT: Payment'[Post Date]),
FILTER(
ALL('FACT: Payment'),
[Account]=EARLIER('FACT: Notes'[Account])
)
)
return
IF(
postdate>[Note Date],
1,0
)
Measure:
Flag Measure =
var postdate =
CALCULATE(
MAX('FACT: Payment'[Post Date]),
FILTER(
ALL('FACT: Payment'),
[Account]=MAX('FACT: Notes'[Account])
)
)
return
IF(
postdate>MAX([Note Date]),
1,0
)
PostDate =
CALCULATE(
MAX('FACT: Payment'[Post Date]),
FILTER(
ALL('FACT: Payment'),
[Account]=MAX('FACT: Notes'[Account])
)
)
Result:
Best Regards
Allan
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi, @PowerBI123456
You may create a calculated column and measures as below. The pbix file is attached in the end.
Calculated column:
Flag Column =
var postdate =
CALCULATE(
MAX('FACT: Payment'[Post Date]),
FILTER(
ALL('FACT: Payment'),
[Account]=EARLIER('FACT: Notes'[Account])
)
)
return
IF(
postdate>[Note Date],
1,0
)
Measure:
Flag Measure =
var postdate =
CALCULATE(
MAX('FACT: Payment'[Post Date]),
FILTER(
ALL('FACT: Payment'),
[Account]=MAX('FACT: Notes'[Account])
)
)
return
IF(
postdate>MAX([Note Date]),
1,0
)
PostDate =
CALCULATE(
MAX('FACT: Payment'[Post Date]),
FILTER(
ALL('FACT: Payment'),
[Account]=MAX('FACT: Notes'[Account])
)
)
Result:
Best Regards
Allan
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hello, sorry. How can I make that the 1 is glued only to the last date of management, and that if the account is managed on May 16, May 19 and May 26, and payment on May 17 and May 27 I stick the 1 only to the procedures of May 16 and 26 since they are those that would be taken as fulfilled since in the management of May there is no payment.
Create a new column
check = IF(Payment[Post Date] > Notes[Note Date],1,0)
Now filter on the check column to show only 1
Hope it resolves your issue? Did I answer your question? Mark my post as a solution! Appreciate your Kudos, Press the thumbs up button!! Linkedin Profile |
Hi - what table should I create that column in?
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 |
---|---|
112 | |
97 | |
80 | |
69 | |
59 |
User | Count |
---|---|
150 | |
119 | |
104 | |
87 | |
67 |