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 all,
I'm in need of a measure that allows me to distribute sales coming from sub_channelgrouping = Unknown into my other rows. This should be based on the share that each row have of the total sales without unknowns. I've got my measure to work when the only category column inside my table is sub_channelgrouping. But i would like to be able to add more columns to the matrix without disrupting the measure.
First picture: working totally as intended
Second picture: no longer splits out the "unknown" into the other rows
Measure used for the sales adjusted:
@Almiwork , You need to consider, You need to divide first or Multiply, that can make a lot of diff. as of now it is multiplication first.
IF(SELECTEDVALUE('Customer Status & Traffic Sales'[Sub_ChannelGrouping]) in {"Unknown"} || isblank(SELECTEDVALUE('Customer Status & Traffic Sales'[Sub_ChannelGrouping])) , BLANK(),
SUM('Customer Status & Traffic Sales'[actual_sales]) + (CALCULATE(SUM('Customer Status & Traffic Sales'[actual_sales]), 'Customer Status & Traffic Sales'[Sub_ChannelGrouping] = "Unknown") * SUM('Customer Status & Traffic Sales'[actual_sales])/CALCULATE(SUM('Customer Status & Traffic Sales'[actual_sales]), 'Customer Status & Traffic Sales'[Sub_ChannelGrouping] <> "Unknown")))
Not sure what you mean by divide or multiply first?
Your listed code produced exactly the same outcome as mine, doesn't work when adding the second column to the table.
@Almiwork , I have done only chance in if. But this part you need to revisit
(CALCULATE(SUM('Customer Status & Traffic Sales'[actual_sales]), 'Customer Status & Traffic Sales'[Sub_ChannelGrouping] = "Unknown") * SUM('Customer Status & Traffic Sales'[actual_sales]) / CALCULATE(SUM('Customer Status & Traffic Sales'[actual_sales])
Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.
https://drive.google.com/file/d/1TwKC5J6VFmNRTrw8MHGosZ5Ui0vZWoJq/view?usp=sharing
Does this link work for getting my sample pbix?
Hi, @Almiwork
Access Denied. Can you check if your sample file is set to "Public on the web" in the Google Drive link sharing window?
Best Regards,
Community Support Team _ Eason
The order of multiplication and division doesn't matter fyi?
I'll see if I can work together a sample dataset
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 61 | |
| 43 | |
| 40 | |
| 38 | |
| 22 |
| User | Count |
|---|---|
| 178 | |
| 125 | |
| 116 | |
| 77 | |
| 54 |