cancel
Showing results for
Did you mean:
Highlighted
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

## 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

Proud to be a Datanaut!

3 REPLIES 3
Community Support Team

## Re: Include Lod of Tableau in Power BI

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

## 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

Proud to be a Datanaut!

Community Support Team