Forum Discussion
Composite key with filter
- 3 years ago
Hi Jug ,
Please try:
Measure = var _a = CALCULATE(MAX('ADDRESS'[UPDATE_DATE]),FILTER(ALL('ADDRESS'),[ID_CLIENT]=MAX('ADDRESS'[ID_CLIENT]))) return IF(MAX('ADDRESS'[UPDATE_DATE])=_a&&MAX('CLIENT'[CONTRACT_STATUS])="VALID",1,0)then apply it to the visual level filter:
Final output:
Best Regards,
Jianbo Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi Jug ,
What does your source data look like?
Sorry for that the information you have provided is not making the problem clear to me. Can you please share more details to help us clarify your scenario?
Please provide me with more details about your table and your problem or share me with your pbix file after removing sensitive data.
Refer to:
How to provide sample data in the Power BI Forum
How to Get Your Question Answered Quickly
Best Regards,
Jianbo Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- Jug3 years agoFrequent Visitor
I can't share the data, but I tried to exemplify below:
CLIENT= Customers who have a contract
ADDRESS = customers address
ID_CLIENT = individual customer number
In this case I would need to use as the key for the CLIENT table only Ana's ID which has the status of the contract as Valid. In the Address table, I would have to use the Ana's ID that has the most up-to-date address.
Please check if this could help you to understand.
Best regards