Is DAX from Power BI same as LOD in Tableau - powerbi

I'm new to tableau. my question is, is DAX from Power BI same as LOD in Tableau?
It'd be great if someone could help me with an explanation for this.
thanks in advance!

There are similarities for sure. In Excel it can be a way to display a value that is unaffected by filtering.
LODs are similar in that you can fix your value.
For example, if I want to know the total sales in a workbook regardless of what row/column the value is on, I could use a FIXED LOD expression:
{FIXED : SUM([Sales]}
If you put the above on Label and a Month dimension on rows, it will ignore the segmentation of months and display the total sum of sales for the entire workbook.
You can choose to fix on a different level of detail to achieve a different result:
{FIXED [Month] : SUM([Sales]}
If you put the above on Label and a month and date dimension on rows it will display the total sum of sales for each month, and ignore the date. And so on...
They're somewhat tricky to get used to, but they come up a lot in more complex workbooks.

I would put it this way, the DAX language is at least as powerful as Tableau expressions (involving LOD or otherwise). That is, if you can do it with Tableau LOD, then there's also a way to write something equivalent with DAX.

Related

How to consolidate the sales data using DAX

Hi everyone,
I have a data table named as sales in PBI as shown in the screenshot above. I want to create a matrix visualizer to consolidate all the sales by month. The expected output for the matrix will be something like this:
I'm having challenge to use DAX formula to consolidate the sales. Right now, I'm using SUM(sales[Sales]) to calculate, but what I got in the matrix for each rows is the total sales. I tried to used SUMX as well but it doesn't work either. Any help or advise will be greatly appreciated!
If you have it stored as a string SUM functions won't work - which is the only error I can think of with data as simple as that.
You also don't need to make a function for something like this. Just make a new table with "Month & Year" and "Sales" it'll default to using SUM of sales if it's stored as a number or integer.

Power BI DAX - Measure to change name of row value

I need some help creating a measure to change the name of "FROM_USER" in the slicer here.
I think I need to use the function SELECTEDVALUE, but I have not managed to get it working.
So, the column has only two values, CRAWLER and FROM_USER.
Any suggestions would be helpful!
See picture
Measures can't be used as slicer values. If you want the column values to be changed and yet to be used in a slicer, you need to create a calculate column to change that.
Column = IF('Table'[Column1]="FROM_USER","desiredValue","CRAWLER")
If you are really keen on using a measure to slice, you need to build a disconnected table and follow the method described here. But the performance will take a hit depending on how complex your data model and calculations are.

Calculate % of two columns Power BI

I want to calculate % of two columns which are already in %.
I want to calculate formula like
Target achieved= ACTUAL/TARGET
But here is ACTUAL is already a measure/calculated metrics so I'm not able to divide these two columns.
Any help would be appreciated..
Make sure both target and actual are actually numbers and not strings. You can do it in transform data (aka Power Query) part, before data is loaded into the report.
After that you should be able to create the measure you want, e.g. something like that:
UPDATE : What happens if Actual is not a column, but a measure?
If Actual measure is based on the columns in the same table as target you shouldn't have a problem. You cannot combine measure and column in the same formula. Measure is an aggregated field and needs to be grouped by another field (if you are familiar with SQL,think of SUM and GROUP BY). Coming back to your problem, you need to create measure out of "Target" column as well (notice I have in the formula SUM('Table'[Plan]) which makes it a measure). Than you can use both of them in the formula, but of course you need to "group" them by something(e.g. date) otherwise it will just show you a total.

Filtered LOD calculations in DAX expression Power BI

I have created LOD expressions in Tableau before which dynamically calculate when filters are applied. I am trying to achieve similar functionality in Power BI. I am very new to Power BI so I probably didn't ask google the right question. I simply want a column that shows the average sales over my "Filtered" data set. The closest I cam was using the Calculate(average(table[column]),All(table)) but that does not dynamically change when I apply the date slider. If I filter for 1/1 - 1/5 I want that average. Change the date range, the average should change.
Thank you.
You are probably looking for the ALLEXCEPT() function. In this case you would do something like
CALCULATE(AVERAGE(table[column]), ALLEXCEPT(table, table[date]))
that is basically saying that you want to remove all filters on the table except the filters on the date column.
CALCULATE(
AVERAGE(Table[Column]),
ALLSELECTED()
)

How to build a matrix, similar to the table from Google analytics

In PowerBI I'd like to build Non-standard matrix very similar to the report in Google Analytics.
What do I have now:
I want to change my subtotal to measure, which is calculated as the difference in percentage of the two values
What I want to get:
In Power BI, there is no way to override the subtotals of a matrix with a calculation. Part of the challenge is that you know there are only two date ranges, but as far as Power BI is concerned, there could be any number of date ranges.
It's difficult to tell from your question exactly what input you have and what output you're looking for. Further, the numbers in your screenshots are obscured. However, one consideration would be to solve the problem using measures (i.e. a measure representing the first date range, a measure representing the 2nd date range, and then a measure calculating the difference between them). You may need to change the layout of your visual a little to make this work and the specific design would depend on how static your date ranges are.