Forum Discussion
Measure misbehaving when adding more columns to matrix
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.
- amitchandak4 years ago
Super User
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.- Almiwork4 years agoFrequent Visitor
The order of multiplication and division doesn't matter fyi?
I'll see if I can work together a sample dataset - Almiwork4 years agoFrequent Visitor
https://drive.google.com/file/d/1TwKC5J6VFmNRTrw8MHGosZ5Ui0vZWoJq/view?usp=sharing
Does this link work for getting my sample pbix?
- v-easonf-msft4 years ago
Community Support
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