Forum Discussion
Power Bi -> Max_value and Count
- 1 year ago
Hi Molika,
I understand your requirement.
Please find the updated DAX measure below:DateCountPerID_Filtered =
CALCULATE(
COUNTROWS('Table'),
FILTER(
'Table',
'Table'[ID] = MAX('Table'[ID])
)
)
Please refer below attached snaps for your reference.
I hope my suggestions provided valuable insights. If you have any further questions, don’t hesitate to ask in a follow-up message.
If this post helped, please mark it as "Accept as Solution" so others can benefit as well.Best regards,
Sahasra.
Hi Molika,
Please follow below steps.
1. I have created sample table(Table) and columns (ID and Date).
2. Created MIN and MAX Measures with below DAX.
Min_Date = MIN('Table'[Date])
Max_Date = MAX('Table'[Date])
3. Count of Dates per ID's :
Created below measure for Date count per ID.
DateCountPerID =
CALCULATE(
COUNTROWS('Table'),
ALLEXCEPT('Table', 'Table'[ID])
)
4. In Table visual, drag all the columns and drag Date column to slicer.
Please refer below attached snaps for your reference.
Please follow below steps.
1. I have created sample table(Table) and columns (ID and Date).
2. Created MIN and MAX Measures with below DAX.
Min_Date = MIN('Table'[Date])
Max_Date = MAX('Table'[Date])
3. Count of Dates per ID's :
Created below measure for Date count per ID.
DateCountPerID =
CALCULATE(
COUNTROWS('Table'),
ALLEXCEPT('Table', 'Table'[ID])
)
4. In Table visual, drag all the columns and drag Date column to slicer.
Please refer below attached snaps for your reference.
If this solution worked for you, kindly mark it as Accept as Solution and feel free to give a Kudos, it would be much appreciated!
Thank you.
Hi and thanks for your response.
that is what i already have as rsult BUT i expect that ID164 is counted with 1 and not 2 because i have not selected 02/01/2025 wthin the slicer. I hope you can understand what I mean.
Best regards
- v-sgandrathi1 year agoCommunity Support
Hi Molika,
I understand your requirement.
Please find the updated DAX measure below:DateCountPerID_Filtered =
CALCULATE(
COUNTROWS('Table'),
FILTER(
'Table',
'Table'[ID] = MAX('Table'[ID])
)
)
Please refer below attached snaps for your reference.
I hope my suggestions provided valuable insights. If you have any further questions, don’t hesitate to ask in a follow-up message.
If this post helped, please mark it as "Accept as Solution" so others can benefit as well.Best regards,
Sahasra.- v-sgandrathi1 year agoCommunity Support
Hi Molika,
We haven’t heard from you on the last response and was just checking back to see if your query was answered.
Otherwise, will respond back with the more details and we will try to help .If our response has addressed your query, please accept it as a solution and give a ‘Kudos’ so other members can easily find it. Please let us know if there’s anything else we can do to help.
Thank you.
- v-sgandrathi1 year agoCommunity Support
Hi Molika,
As we have not received a response from you yet, I would like to confirm whether you have successfully resolved the issue or if you require further assistance.
If the issue has been resolved, please mark the helpful reply as a "solution" to indicate that the question has been answered and to assist others in the community.
Thank you for your cooperation. Have a great day.