cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
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
Microsoft
Microsoft

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.
Super User II
Super User II

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
secondImage

Congratulations!

We are excited to announce the Power BI Super Users!

Microsoft Ignite

Microsoft Ignite with Arun Ulag

Featured Session: Drive Data Culture with Power BI- Vision, Strategy & Roadmap. Register here https://myignite.microsoft.com #MSIgnite #PowerPlatform #Power BI ​

Microsoft Ignite

Microsoft Ignite

Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!

secondImage

The largest Power BI virtual conference

100+ sessions, 100+ speakers, Product managers, MVPs, and experts. All about Power BI. Attend online or watch the recordings.

Top Solution Authors
Top Kudoed Authors