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
MR007
Frequent Visitor

Migration of Tableau LOD to Power bi

Hi All,

 

i need your help to build Dax using below Tableau Lod

 

% Doc count = [count Doc] / TOTAL([count Doc])

 

where "Count Doc" is distinct count of "docno"

 

Thanks in advance.

1 REPLY 1
Samarth_18
Community Champion
Community Champion

Hi @MR007 ,

 

It would help us to give answer more specifically if you could share some sample data with required output.

You can try below code:-

% Doc count =
VAR distinct_count =
    CALCULATE ( DISTINCTCOUNT ( [count Doc] ) )
VAR total_count =
    CALCULATE ( COUNT ( [count Doc] ) )
RETURN
    DIVIDE ( distinct_count, total_count )

 

Thanks,

Samarth

Best Regards,
Samarth

If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
Connect on Linkedin

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.

Top Solution Authors