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
tstackhouse
Helper III
Helper III

Creating a similar calculation to a Level of Detail Calcualtion in Tableau

I have the following Level of Detail (LoD) calculation from one of my Tableau workbooks. I am hoping to get some insight on how I would go about replicating this calculated field in power BI.

 

 

LoD Calc Tableau.PNG

4 REPLIES 4
v-yulgu-msft
Employee
Employee

Hi @tstackhouse,

 

As I am not familiar with the Level of Detail (LoD) calculation you provided, please post sample data and share us your desired output so that I can try to achieve the same requirement in Power BI.

 

Regards,
Yuliana Gu

Community Support Team _ Yuliana Gu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hello @v-yulgu-msft,

Attached is essentially what I would like to see. Included is  the Patients (by their DoB) that have purchased an "O/B/MR" item.

 "O/B/MR" is a calculated field which says:

 

if [drugname] contains "name of certain drug" then "O" elseif [drugname] contains "name of certain drug" then "MR" elseif [drugname] contains "name of certain drug" then "B" END

 

I am not that familiar with Power BI so I am not sure how to post sample data but below is hwat the end result looks like on Tableau. With Taableau you can attached a packaged workbook to the forums, I am not sure that there is a way to do this with Power BI.

Thank you!

 

 

Capture.PNG

Hi @tstackhouse,

 

O/B/MR =
IF (
    NOT ( ISERROR ( FIND ( "O", Table1[Drug Name], 1 ) ) ),
    "0",
    IF (
        NOT ( ISERROR ( FIND ( "B", Table1[Drug Name], 1 ) ) ),
        "B",
        IF ( NOT ( ISERROR ( FIND ( "MR", Table1[Drug Name], 1 ) ) ), "MR", BLANK () )
    )
)

Replace 'Table1' with your own table name. And replace the text highlighted in red with the actual "name of certain drug".

 

Best regards,
Yuliana Gu

Community Support Team _ Yuliana Gu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
TomMartens
Super User
Super User

Hey,

 

basically it's no problem to re-create the Level Of Details calculations from Tableau in Power BI. This is done by using the DAX query language.

 

Here is a little example

https://community.powerbi.com/t5/Desktop/Level-of-Detail-Calcs/td-p/17839

 

If you need further assistance, it would be helpfuls, if you can share some sample data, by providing a link to an Excel file on onedrive or dropbox.

 

Hope this gets you started

 

Regards

Tom

 



Did I answer your question? Mark my post as a solution, this will help others!

Proud to be a Super User!
I accept Kudos 😉
Hamburg, Germany

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.