cancel
Showing results for 
Search instead for 
Did you mean: 
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
Carousel_PBI_Wave1

2023 Release Wave 1 Plans

Power BI release plans for 2023 release wave 1 describes all new features releasing from April 2023 through September 2023.

Power BI Summit Carousel 2

Global Power BI Training

Make sure you register today for the Power BI Summit 2023. Don't miss all of the great sessions and speakers!

BizApps LATAM 2023

Business Application LATAM Summit 2023

Join the biggest FREE Business Applications Event in LATAM this February.

Power Platform Bootcamp

Global Power Platform Bootcamp

In this bootcamp we will deep-dive into Microsoft’s Power Platform stack with hands-on sessions and labs, delivered to you by experts and community leaders.