Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hi,
I need help please with this measure as its not returning correct % of parent row total rather its returning 100% for ALL values instead of sum of each value to equal 100%
%JobToAccepInterval by Row Total = DIVIDE (
SUM('FreightForward'[JOBCOUNT]),
CALCULATE ( SUM('FreightForward'[JOBCOUNT]), ALLSELECTED(FreightForward[JobToAccep Interval])))
Solved! Go to Solution.
Try this,
%JobToAccepInterval by Row Total =
VAR Month = SELECTEDVALUE('Calendar'[MonthNum])
Return
DIVIDE(SUM(FreightForward[JOBCOUNT]) , CALCULATE(SUM(FreightForward[JOBCOUNT]) , ALLSELECTED(FreightForward) , 'Calendar'[MonthNum] = Month) , BLANK())
/ J
Proud to be a Super User!
@Anonymous , try
%JobToAccepInterval by Row Total = DIVIDE (
SUM('FreightForward'[JOBCOUNT]),
CALCULATE ( SUM('FreightForward'[JOBCOUNT]), removefilters(FreightForward[JobToAccep Interval])))
or
%JobToAccepInterval by Row Total = DIVIDE (
SUM('FreightForward'[JOBCOUNT]),
CALCULATE ( SUM('FreightForward'[JOBCOUNT]), ALLSELECTED(FreightForward)))
The first measure didn't work but the 2nd measure is close but not quite right i.e. as per screenshot below, the sum of each % should equal 100% for each month
%JobToAccepInterval by Row Total = DIVIDE (
SUM('FreightForward'[JOBCOUNT]),
CALCULATE ( SUM('FreightForward'[JOBCOUNT]), ALLSELECTED(FreightForward)))@Anonymous
Try this measure: Replace [HOURS CATEGORY] with the name of the legend category you have which shows hrs 0-2 and so on.
%JobToAccepInterval by Row Total =
DIVIDE (
SUM('FreightForward'[JOBCOUNT]),
CALCULATE ( SUM('FreightForward'[JOBCOUNT]),
ALLSELECTED([HOURS CATEGORY]))
)
________________________
If my answer was helpful, please consider Accept it as the solution to help the other members find it
Click on the Thumbs-Up icon if you like this reply 🙂
:
⭕ Subscribe and learn Power BI from these videos
⚪ Website ⚪ LinkedIn ⚪ PBI User Group
Hi @Fowmy, unfortunately that didn't either work either as per screenshot.
%JobToAccepInterval by Row Total =
DIVIDE (
SUM('FreightForward'[JOBCOUNT]),
CALCULATE ( SUM('FreightForward'[JOBCOUNT]),
ALLSELECTED(FreightForward[JobToAccep Interval]))
)@Anonymous
You may share your PBIX file with sample data to check if the model is set up correctly.
________________________
If my answer was helpful, please consider Accept it as the solution to help the other members find it
Click on the Thumbs-Up icon if you like this reply 🙂
⭕ Subscribe and learn Power BI from these videos
⚪ Website ⚪ LinkedIn ⚪ PBI User Group
Try this,
%JobToAccepInterval by Row Total =
VAR Month = SELECTEDVALUE('Calendar'[MonthNum])
Return
DIVIDE(SUM(FreightForward[JOBCOUNT]) , CALCULATE(SUM(FreightForward[JOBCOUNT]) , ALLSELECTED(FreightForward) , 'Calendar'[MonthNum] = Month) , BLANK())
/ J
@tex628
Can you help me understand why removing filters did not work?
⭕ Subscribe and learn Power BI from these videos
⚪ Website ⚪ LinkedIn ⚪ PBI User Group
The calendar table filters FreightForward through the visual legend. The Legend is considered a context filter and is therefore removed by the ALLSELECTED() statement. I'm going to be perfectly honest and say that I'm not exactly sure of the behaviour of ALLSELECTED, it's incredibly complicated.
In my mind the legend of the calendar table should be seperate and unaffected by the ALLSELECTED(), but instead the filter is actually removed.
If you want to try and grasp just how messed up that syntax is I would advice you to read this:
https://www.sqlbi.com/articles/the-definitive-guide-to-allselected/
Br,
J
@tex628
Thanks a lot!
Lemme start my experiments 🙂
Thanks again
Fowmy
⭕ Subscribe and learn Power BI from these videos
⚪ Website ⚪ LinkedIn ⚪ PBI User Group
Your allselected statement is removing the filter on month since your month column is in the same table (or doublesided crossfilter) as the freightforward column.
If the column is in the same table you should create a calendar dimension table.
If you have a doublesided relationship you should change the crossfilter, either in the relationshipmodel or in the calculation using CROSSFILTER()
Br,
J
one way
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 41 | |
| 38 | |
| 36 | |
| 31 | |
| 28 |
| User | Count |
|---|---|
| 129 | |
| 88 | |
| 79 | |
| 68 | |
| 63 |