cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
maheshrakwal Frequent Visitor
Frequent Visitor

Include Lod of Tableau in Power BI

In Tableau We have Include LOD as below : 

 

{INCLUDE  [Region] : COUNTD([Categories])}

 

Need help to convert above calculation in PowerBI (Dax).

1 ACCEPTED SOLUTION

Accepted Solutions
Super User
Super User

Re: Include Lod of Tableau in Power BI

@maheshrakwal

I would suggest the below DAX to replicate the behaviour of an INCLUDE LOD in DAX, assuming you are aggregating with SUM:

 

=
SUMX (
    VALUES ( 'table'[Region] ),
    CALCULATE ( DISTINCTCOUNT ( 'table'[Categories] ) )
)

 

Tableau's INCLUDE is very similar to an iterator in DAX applied to the distinct values of a particular column.

 

Regards,

Owen



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

Proud to be a Datanaut!




3 REPLIES 3
Community Support Team
Community Support Team

Re: Include Lod of Tableau in Power BI

Hi @maheshrakwal,

 

Try this formula as a measure, please.

 

Measure =
DISTINCTCOUNT ( 'table'[Categories] )

Then add the [Region] in a table visual with the Measure. The [Region] column is a context in the Power BI visuals. 

 

 

Best Regards,
Dale

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

Re: Include Lod of Tableau in Power BI

@maheshrakwal

I would suggest the below DAX to replicate the behaviour of an INCLUDE LOD in DAX, assuming you are aggregating with SUM:

 

=
SUMX (
    VALUES ( 'table'[Region] ),
    CALCULATE ( DISTINCTCOUNT ( 'table'[Categories] ) )
)

 

Tableau's INCLUDE is very similar to an iterator in DAX applied to the distinct values of a particular column.

 

Regards,

Owen



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

Proud to be a Datanaut!




Community Support Team
Community Support Team

Re: Include Lod of Tableau in Power BI

Hi @maheshrakwal,

 

Could you please mark the proper answers as solutions?

 

Best Regards,

Dale

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