Power BI For Tableau Developers.
- Gowtham V

- Sep 4, 2023
- 2 min read
In this article, I explained, how a Tableau Developer can leverage existing Tableau skills to create power data driven calculations, reports and dashboards in Power BI.

* Tableau LOD's in POWER BI.
What is LOD?
LOD (Level of Detail) allows you to compute values at the level of data source and visualization. However, it gives you more control over the level of granularity you want to compute.
1. Exclude LOD - Exclude LOD Function comes after the dimension filter. Hence it will be affected by the dimension filters. (Exclude LOD : Respects and recognizes all of the dimensions that are in the view. But removes the dimensions that are found in the expressions in the calculations). Exclude LOD - { EXCLUDE [Category] : SUM([Sales])}

* We're able to replicate the same results in Power BI by using the following DAX Measure. Total Sales All State = CALCULATE(SUM(Orders[Sales]), ALLSELECTED(Orders[Category])) * Calculate Function - Evaluates an expression in a modified filter context.
* ALLSELECTED only ignores the filters coming from inside the visual itself.

2. Fixed LOD - Fixed LOD Function sit above the dimension filter and after the context filter.
When we bring sum of sales for category and Sub-Category, Sales are drilled down at sub-category Level by default. To calculate the sum of sales at the category level. We used Fixed LOD in tableau - {Fixed [Category] : SUM([Sales])}

* How to apply DAX to achieve the Fixed LOD in Tableau? To calculate the sum of sales at the category level in Power BI, we can use ALLEXCEPT in DAX to do the same thing as Fixed LOD in tableau. All Except - Returns all the rows in a table except for those rows that are affected by specified column filters.

3. Include LOD - INCLUDE level of detail expressions computes values using the specified dimensions in addition to whatever dimensions are in the view.
Problem Scenario : In the below scenario, as we see there the only dimension used in view is Region. But the requirement is to calculate Average sales at the customer level for each region without using the Customer dimension in view. For this purpose, we can use included LOD.
AVG({ INCLUDE [Customer Name] : SUM([Profit])})

Let's Try to Achieve the same in Power BI. Sales average per Customer Name = AVERAGEX( KEEPFILTERS(VALUES('Orders'[Customer Name])), CALCULATE(SUM('Orders'[Sales])) ) As the name suggests, KEEPFILTERS keeps the existing filter and adds the new filter to the context. It is combining the filters applied by the table visual, and then it further adds the filter.

Thank You. Please leave your valuable comments for any improvisation is needed.




Comments