Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Dax Measures and columns

I am migrating the Tableau dashboards to power bi dashboards and getting confusions inorder to covert the Tableau LOD expressions equivalent to power BI.

 

I have one tableau function which is given below; can anyone please tell appropriate DAX formula in power BI?

 

Run rate as per invoice: {Include [Sales_No]:Sum((IFNULL(IIF(([Invoice])=0,1,([Invoice]))/{ Exclude [Product name],[product_name],[product_id],[City_id],[Grouping],[PRODUCTS_ID],[Sales Associate],[String Value of Revenue Date],[Old SBU],[City],A_ID : Sum(IIF(([Invoice])=0,1,([Invoice])))},1)))}

4 REPLIES 4
Anonymous
Not applicable

Sales_Amount: { Include [Sales_No],[PRODUCTS_ID]: (Sum({Fixed [Sales_No]: Avg([Datbase_Sales_Amount])}) * Sum([Run Rate as per Invoice])) }

 

Run Rate as per Invoice: Data Range from [1 to 7]

 

 

 

 

 

 

Screenshot (6).png

 

 

@Anonymous , Try one of the two

 

calculate(divide(Average(Table[Database_sales]), count(Table[Database_sales])), allexcept(Table, Table[Sales_No]))

 

or

 

calculate(divide(Average(Table[Database_sales]), count(Table[Database_sales])), filter(allselected(Table, Table[Sales_No] =max(Table[Sales_No]))))

Anonymous
Not applicable

Okay,

Is this formula that I have use for Sale Amount or Run rate as per Invoice. Or please give equivalent DAX formulas for below tableau functions.

 Sale Amount: {Include [Sales No], [PRODUCTS_ID]: (Sum ({Fixed [Sales No]: Avg([Datbase_Sales_Amount])}) * Sum ([Run Rate as per Invoice]))}

Run rate as per invoice: {Include [Sales No]:Sum((IFNULL(IIF(([Invoice])=0,1,([Invoice]))/{ Exclude [Product name],[product_name],[product_id],[City_id],[Grouping],[PRODUCTS_ID],[Sales Associate],[String Value of Revenue Date],[Old SBU],[City],A_ID : Sum(IIF(([Invoice])=0,1,([Invoice])))},1)))}

amitchandak
Super User
Super User

@Anonymous , Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors