cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
AleksandrMe
Resolver I
Resolver I

Percentage between two columns

Good day, 

 

I have two tables, related to each other by fist column (name of the source file). I'm looking for measure to show me how many "RISK and HIGH RISK" checks were done comparing to "none or standard". Result should be in procents and filtered by year (2021)

 

SOURSE FILE NAMEREASON FOR CHECK   SOURSE FILE NAMEDate of Check
1none  12020
2risk  22020
3high risk  32021
4none  42021
5standard  52021
6risk  62021

 

For example in 2021 there were 4 checks where two of these were (Risk/High Risk) - final result is 50% in 2021. 

 

Thnaks

Aleks 

1 REPLY 1
DataInsights
Super User II
Super User II

@AleksandrMe,

 

Try these measures:

 

Check Count = COUNT ( CheckReason[SOURSE FILE NAME] )

Check Percent = 
VAR vNumerator =
    CALCULATE (
        [Check Count],
        CheckReason[REASON FOR CHECK] IN { "risk", "high risk" }
    )
VAR vDenominator = [Check Count]
VAR vResult =
    DIVIDE ( vNumerator, vDenominator )
RETURN
    vResult

 

DataInsights_0-1626043175952.png

 

Helpful resources

Announcements
PBI_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Get Ready for Power BI Dev Camp

Microsoft named a Leader in The Forrester Wave

Microsoft received the highest score of any vendor in both the strategy and current offering categories.

Get Ready for Power BI Dev Camp

Power BI Dev Camp - September 30th, 2021

Mark your calendars and join us for our next Power BI Dev Camp!

PowerPlatform 768x460.png

Microsoft Learn

Check out our new Discover Your Career Path blog post series and get all the details.