How to write below excel formula into Power BI?
=IFERROR(AVERAGEIF('Historical '!$A$3:$X$100687,'Current Year '!$A2,'Historical '!$X$3:$X$100687),"No AUP ")
You'd write an AVERAGEX() or CALCULATE(AVERAGE()) formula with filter conditions that match your AVERAGIF condition. You have not given enough information to say much more than that.
Related
I have this excel formula, how can I get around to translate this into a Power BI Measure in DAX. Also in excel we have the Today() function, how can I define 'today' in Power BI DAX?
=IF(ISNUMBER([#[StartDate]]),
IF(ISNUMBER([#ActualStartDate]),IF([#ActualStartDate]-[#[StartDate]]>=1,"Late",IF([#ActualStartDate]-[#[StartDate]]<0,"Early","On-Time")),
IF([#[StartDate]]>TODAY(),"Targeted","Running-Late")),
IF(ISNUMBER([#ActualStartDate]),"Started","Not-Started"))
Just wonder Is there an Excel to DAX translator available :)
I managed to create a calculated column, as below. I wonder if it is possible to create this as a "Measure" instead.
Calc_Status_col = if(isnumber('table'[planned_start].[Date]),
if(ISNUMBER('table'[actual_start].[Date]),if('table'[actual_start].[Date]-'table'[planned_start].[Date]>=1,"Late",if('table'[actual_start]-'table'[planned_start].[Date]<0,"Early","On-Time")),
if('table'[planned_start].[Date]>TODAY(),"Targeted","Running-Late")),
if(ISNUMBER('table'[actual_start].[Date]), "Started", "Not-Started"))
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.
Is there a way to replicate the formula below in excel onto a Power BI measure?
I want for each company to return the total number of countries it applied for.
Many thanks in advance
Nasos
hi I am trying to redo an analytic which is already there in Spotfire to Power Bi. There is calculated column Max([ Date]) over ([ContentId]) .
Can anyone help me with converting this calculated column in Power Bi
You could use something similar to the following calculation:
Calc_Column = CALCULATE(MAX(Table[Date]),ALLEXCEPT(Table,Table[ContentID]))
Replace "Table" with the name of your table and you should be good to go. Hope this helps.
I have a power bi report with live connection to the SSAS cube. I have a numeric column which I wanted to convert to text using DAX, since its a live-conection i cannot change this on power bi end. is there a way ?
You can use the format function in dax,
For example you can add a new column as the following example:
New_Column = FORMAT(Table1[NumericColumn];"General Number")
Get this example from the source in Pre-Defined Numeric Formats for the FORMAT Function
Hope this can help you!