Forum Discussion
The8
2 years agoHelper II
Table Total Incorrect with Measure A using in New Measure
Hi, I have loaded data into power BI from excel and I have created relationship betweeen tables using currency column. Sheet 1 Sheet 2 Now I have following measures Final Price...
- 2 years ago
Hi,
PBI file attached.
Hope this helps.
The8
2 years agoHelper II
Hi Greg_Deckler
Thank you, Good day!
You are exactly right, when we change relationship direction to "both" and adding Material into my measure as below is working absolutely fine even with Material Slicer.
"
Net Price Total Date Material =
Net Price Total Date Material =
VAR __Table = SUMMARIZE( 'Sheet1', [Date],[Material],"__Value", [Net Price])
VAR __Result = IF(HASONEVALUE(Sheet1[Date]), [Net price], SUMX(__Table, [__Value]))
RETURN
__Result"
But when I make slicer selection based on date again I have same problem, totals being wrong as below image for your reference.
With Date SLicer Selection:
Any changes needs to be done still ?
Greg_Deckler
2 years agoCommunity Champion
The8 That would be:
Net Price Total Date Material =
VAR __Table = SUMMARIZE( ALLSELECTED('Sheet1'), [Date],[Material],"__Value", [Net Price])
VAR __Result = IF(HASONEVALUE(Sheet1[Date]), [Net price], SUMX(__Table, [__Value]))
RETURN
__Result"
- The82 years agoHelper II
Hi Greg_Deckler
Thanks for your update.
But I still have the save problem with incorrect totals.
Measure I usedNet Price Total Date Material ="VAR __Table = SUMMARIZE( ALLSELECTED('Sheet1'), [Date],[Material],"__Value", [Net Price])VAR __Result = IF(HASONEVALUE(Sheet1[Date]), [Net price], SUMX(__Table, [__Value]))RETURN__Result"