Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
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])
User | Count |
---|---|
25 | |
12 | |
8 | |
7 | |
7 |
User | Count |
---|---|
25 | |
12 | |
11 | |
10 | |
6 |