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

Struggling to load the report when more than one table involving in table visual - Need help

We have a requirement for showing the report comparison based on from & To selected Quarter(YYYY/QQ). I have added the data model & measures for your reference.
We have a below 2 measure for getting the summarized result of part table part number wise ASP(avg selling price) & Pricing Difference, Pricing %

Problem: When we adding the fields from more than one tables with below Measures. Report are struggling to load & showing the below error. Can anyone pls guide me on this
what way we can display the transaction data with all the required fields without issue

 
 

Visual Error.png

Pricing model.PNG

 

ASP= SUM(Sales)/SUM(Qty)

1. P_From ASP =
---------------------------------------------------------
VAR _selectedyr =
SELECTEDVALUE('Date'[Year Number])
VAR _selectedqtr =
VALUES('Date'[YYYY/QQ])
-----------------------------
//new date table
VAR DateTable =
CALCULATETABLE(
'Date',
ALL( 'Date' ),'Date'[Year Number]=_selectedyr,'Date'[YYYY/QQ] IN _selectedqtr
)
---------------------------------------------------------
VAR from_salesamount =
CALCULATE( [Sales Amount], DateTable ,ALLEXCEPT('Part Number','Part Number'[Part Number ID]))
---------------------------------------------------------
VAR from_qty =
CALCULATE( SUM(Sales[Item Qty]), DateTable,ALLEXCEPT('Part Number','Part Number'[Part Number ID]))

RETURN
IFERROR(from_salesamount/from_qty,0)

2. P_Pricing Difference L1 =
VAR Part_Summarize =
SUMMARIZE(Sales,Sales[Part Id])
RETURN
SUMX(Part_Summarize,
IF([From Sales]=0,0, ([To ASP]-[P_From ASP])*[To Quantity]))
1 REPLY 1
amitchandak
Super User
Super User

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.