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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
GREGBLACK
New Member

Creating DAX calculations based on Tableau Calculations

Hi all, new to the PBI world after years using Tableau.

Tryign to replicate a few, what I would call simple Tableau Clacs into DAX but struggling at present.

Any and all help appreciated.

 

Issue #1--trying to define an opportunity based on the fact that it has at least one occurrence of a named product--tableau calc below:

IF
{FIXED [OppID]: COUNTD(IF [Dim Desc Product 3C Category] = 'Managed Services' THEN [Fact Quantity] END)} = 0
THEN
'-'

ELSE
'Opp Contains Managed Services'
END

 

When I try to create the DAX calc -see below--it is not splitting out the Opportunties but returning all as ''Containing Managed Services' when I know only a handful do.

Contains MS =
VAR CountManagedServices = COUNTROWS(
    FILTER('Product', [dim_desc_product_3c_category] = "Managed Services")
)
RETURN
    IF(CountManagedServices = 0, "-", "Opp Contains Managed Services")
 
There are 2 tables that i have joined--an Opportunity table linked to the product table using ID Product in both--thus the Tableau calc is able to use a Fixed LOD calc at the Opp Level and count the instances where Managed Services exist---DAX is struggling with this.
 
Any ideas
 
Cheers
 
Greg
2 REPLIES 2
GREGBLACK
New Member

Hi many thanks for your reply and it will  work great when I want to do a straight LOD but i think in DAX I need to nest the 2nd element of the LOD where I fixed the OPPid and then Count the times a ceetain product appears in any of the OPPIds---can this be done in DAX?

Many thanks again

Greg

amitchandak
Super User
Super User

@GREGBLACK , I have discussed a solution on that, see of that can help

Tableau Vs Power BI- Chapter 6- LOD FIXED (Level of Details)- https://youtu.be/hU-cVOwDCvY

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

Helpful resources

Announcements
ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.