Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

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.

Reply
Anonymous
Not applicable

Calculate Date for Highest Percentage calculated

Dear,

 

I would like to retrieve the date on which the calculation of the success rate (percentage) is the highest.

Unfortunately, I cannot find the correct way of doing this. Below you can find a sample case. The idea is to retrieve 02/01/2021 as date in my example, as for this date the percentage is the highest(max). Can you please help me ?

Below the sample data, you can see the dax speudo code.

Thank you in advance

Tim

 

pbi_maxdate_of_percentage.jpg

 

 

1 ACCEPTED SOLUTION
AlB
Super User
Super User

Hi @Anonymous 

Place this measure in a card visual:

Measure =
TOPN (
    1,
    DISTINCT ( Table1[Date] ),
    DIVIDE (
        CALCULATE ( COUNT ( Table1[Status] ), Table1[Status] = "Success" ),
        CALCULATE ( COUNT ( Table1[Status] ) )
    ), DESC
)

Please mark the question solved when done and consider giving a thumbs up if posts are helpful.

Contact me privately for support with any larger-scale BI needs, tutoring, etc.

Cheers 

 

SU18_powerbi_badge

 

View solution in original post

1 REPLY 1
AlB
Super User
Super User

Hi @Anonymous 

Place this measure in a card visual:

Measure =
TOPN (
    1,
    DISTINCT ( Table1[Date] ),
    DIVIDE (
        CALCULATE ( COUNT ( Table1[Status] ), Table1[Status] = "Success" ),
        CALCULATE ( COUNT ( Table1[Status] ) )
    ), DESC
)

Please mark the question solved when done and consider giving a thumbs up if posts are helpful.

Contact me privately for support with any larger-scale BI needs, tutoring, etc.

Cheers 

 

SU18_powerbi_badge

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.