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

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

Reply
mluanacruz
Helper I
Helper I

Help! Tableau measure into power Bi

Hi everyone,
Can someone please help me transforme this Tableau measure into Power Bi?

Tableau:

countd(if ([NOL to 1st BI offer] <= 30 or [NOL to payment] <= 30) and [ATTY_REP_IND]='N' then [EXPOSURE_ID] end)/
total(countd(if [ATTY_REP_IND]='N' then [EXPOSURE_ID] end))

 

Power BI:

 

 CALCULATE(COUNTA('BI-PD'[EXPOSURE_ID]),
filter('BI-PD', 'BI-PD'[NOL to 1st BI offer]<=30 || 'BI-PD'[NOLTOPAY]<=30 && 'BI-PD'[ATTY_REP_IND]="N"))

    / CALCULATE(COUNTA('BI-PD'[EXPOSURE_ID]),
filter('BI-PD', 'BI-PD'[ATTY_REP_IND]="N"))
1 ACCEPTED SOLUTION
Kaviraj11
Super User
Super User

Hi,

 

Try this out:

 

CombinedRatio =
VAR Numerator =
    COUNTROWS(
        FILTER(
            'YourTableName',
            ([NOL to 1st BI offer] <= 30 || [NOL to payment] <= 30) && [ATTY_REP_IND] = "N"
        )
    )
VAR Denominator =
    COUNTROWS(
        FILTER(
            'YourTableName',
            [ATTY_REP_IND] = "N"
        )
    )
RETURN
DIVIDE(Numerator, Denominator)

 




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





View solution in original post

4 REPLIES 4
Anonymous
Not applicable

@Kaviraj11 's formula is great.

 

And I found countd means count the unique number of rows, it is more recommended that you use DISTINCTCOUNT function, @mluanacruz .

Measure = 
DIVIDE(
    CALCULATE(
        DISTINCTCOUNT('Table'[EXPOSURE_ID]),
        'Table'[NOL to 1st BI offer] <= 30 || 'Table'[NOL to payment] <= 30,
        'Table'[ATTY_REP_IND] = "N"
    ),
    CALCULATE(
        DISTINCTCOUNT('Table'[EXPOSURE_ID]),
        'Table'[ATTY_REP_IND] = "N"
    )
)

 

Best Regards,

Stephen Tao

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

 

Hi, thank you so much for the answer,
I am getting this error: "A function 'PLACEHOLDER' has been used in a True/False expression that is used as a table filter expression. This is not allowed."

 

Do you know how can I modify the measure to fix this issue? Thanks again

Anonymous
Not applicable

Hi @mluanacruz ,

 

How about this?

MEASURE =
DIVIDE (
    CALCULATE (
        DISTINCTCOUNT ( 'Table'[EXPOSURE_ID] ),
        FILTER (
            'Table',
            ( [NOL to 1st BI offer] <= 30
                || [NOL to payment] <= 30 )
                && ( [ATTY_REP_IND] = "N" )
        )
    ),
    CALCULATE (
        DISTINCTCOUNT ( 'Table'[EXPOSURE_ID] ),
        FILTER ( 'Table', [ATTY_REP_IND] = "N" )
    )
)

 

Best Regards,

Stephen Tao

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

Kaviraj11
Super User
Super User

Hi,

 

Try this out:

 

CombinedRatio =
VAR Numerator =
    COUNTROWS(
        FILTER(
            'YourTableName',
            ([NOL to 1st BI offer] <= 30 || [NOL to payment] <= 30) && [ATTY_REP_IND] = "N"
        )
    )
VAR Denominator =
    COUNTROWS(
        FILTER(
            'YourTableName',
            [ATTY_REP_IND] = "N"
        )
    )
RETURN
DIVIDE(Numerator, Denominator)

 




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

Top Solution Authors