Forum Discussion
Total not match with value
- Anonymous1 year ago
Hi Anonymous ,
Base on your description, it seems like you created the following measure. However, the total value is not correct.
VAR _period = SELECTEDVALUE('Calendar'[Qtr-Yr]) RETURN SWITCH( TRUE(), SELECTEDVALUE('Region Table'[Region])="Denmark", CALCULATE(SUM( 'Data'[Value]), ALLEXCEPT('Calendar','Calendar'[Date]), 'Data'[Acct FQ]=_period), CALCULATE(SUM( 'Data'[Value]), ALLEXCEPT('Calendar','Calendar'[Date]), 'Data'[Revenue FQ]=_period))You can create another new measure as below, and put this new measure to replace your above measure.
New Measure = SUMX ( VALUES ( 'Data'[Desc] ), [your original measure] )In addition, you can refer the following link to try to solve your problem...
Dax for Power BI: Fixing Incorrect Measure Totals
If the above one can't help you figure out, please provide some raw data in your tables(exclude sensitive data) with Text format and your expected result with backend logic and special examples. It would be helpful to find out the solution. You can refer the following link to share the required info:
How to provide sample data in the Power BI Forum
And It is better if you can share a simplified pbix file. You can refer the following link to upload the file to the community. Thank you.
How to upload PBI in Community
Best Regards
- 1 year ago
Hi,
This measure pattern should work
Measure = sumx(values(Data[Desc]),[Quarter1])
Hope this helps.
Create a dummy table i.e Test with below column
Desc
Apple
Banana
orange
Mango
Total
Create a measure
M1= Switch(SelectedValue([Test]Desc),[yourTablename]Desc, SUM([yourTablename]Quarter,SUM([yourTablename]Quarter)
add [Test]Desc and M1 in table
Hope this helps
- Anonymous1 year agoNot applicable
This is Measure applied as "Total" not giving right value as changed summarize /If function as doesn't works
Pls support here.
VAR _period = SELECTEDVALUE('Calendar'[Qtr-Yr])
RETURN
SWITCH(
TRUE(),SELECTEDVALUE('Region Table'[Region])="Denmark",
CALCULATE(SUM( 'Data'[Value]),
ALLEXCEPT('Calendar','Calendar'[Date]),
'Data'[Acct FQ]=_period),CALCULATE(SUM( 'Data'[Value]),
ALLEXCEPT('Calendar','Calendar'[Date]),
'Data'[Revenue FQ]=_period))