The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
I have created measure which shows revised target for a sales person dc(distribution channel)wise but i'm getting measure total incorrect.
dax for revised target
revised target =
Solved! Go to Solution.
Hi @komald,
Measure will calculate and generate results per the calculation context. At the same time, the total of measure will do calculations as well and it may be impacted by the functions in your dax formula. So to make the total correct, you can simply create another Measure to help you correct the total.
CorrectTotal =
VAR midT =
ADDCOLUMNS (
TargetBySalesPersonAll,
"Revised",
CALCULATE (
TargetBySalesPersonAll[Revised_target],
VALUES ( TargetBySalesPersonAll[DCCode] )
)
)
RETURN
SUMX ( midT, [Revised] )
Here are some blogs/links may help you better handle such kind of incorrect Measure total as well.
Solved: Measure total incorrect - Microsoft Power BI Community
Fixing Incorrect Totals Using DAX Measures In Power BI | Enterprise DNA
Power BI: Totals Incorrect and how to Fix it - Finance BI (finance-bi.com)
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please let me know how your tables look like, the relationships you create for them and how you create these two count measures. Thanks a lot!
Best Regards,
Community Support Team _ Caiyun
Hi @komald,
Measure will calculate and generate results per the calculation context. At the same time, the total of measure will do calculations as well and it may be impacted by the functions in your dax formula. So to make the total correct, you can simply create another Measure to help you correct the total.
CorrectTotal =
VAR midT =
ADDCOLUMNS (
TargetBySalesPersonAll,
"Revised",
CALCULATE (
TargetBySalesPersonAll[Revised_target],
VALUES ( TargetBySalesPersonAll[DCCode] )
)
)
RETURN
SUMX ( midT, [Revised] )
Here are some blogs/links may help you better handle such kind of incorrect Measure total as well.
Solved: Measure total incorrect - Microsoft Power BI Community
Fixing Incorrect Totals Using DAX Measures In Power BI | Enterprise DNA
Power BI: Totals Incorrect and how to Fix it - Finance BI (finance-bi.com)
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please let me know how your tables look like, the relationships you create for them and how you create these two count measures. Thanks a lot!
Best Regards,
Community Support Team _ Caiyun
@komald , if you use row context you need build total using visual context
refer example
Revised_target =
sumx( Addcolumns( summarize(table, Table[person id], table[reveison] ), "_1"
CALCULATE(Sum(TargetBySalesPersonAll[Target_Amount]),filter(allselected(TargetBySalesPersonAll), TargetBySalesPersonAll[Revision_No]=MAX(TargetBySalesPersonAll[Revision_No])) ), [_1])