Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more
 
					
				
		
Why do I have 10 books on DAX formulas and Power BI and still can't find the answer to this easy problem?
I need this formula rewrote so it will work:
Intercompany Sales = CALCULATE(sum(Sales[Sales]),Sales[CustID]='10275' or '11969' or '12875' or '50013'
I need the total sales of all four of these CustID
I know I will be ashamed when I see the answer. Thanks for your help.
Solved! Go to Solution.
Intercompany Sales = CALCULATE(sum(Sales[Sales]),Sales[Sales]=10275 || Sales[Sales]=11969 || Sales[Sales]=12875 || Sales[Sales]=50013)
This assumes numeric data in Sales. If Text, enclose in "".
Intercompany Sales = CALCULATE(sum(Sales[Sales]),Sales[Sales]=10275 || Sales[Sales]=11969 || Sales[Sales]=12875 || Sales[Sales]=50013)
This assumes numeric data in Sales. If Text, enclose in "".
Thank you so much @Greg_Deckler for answering this, and thank you for asking this question @Anonymous - great community, and this is extremely helpful.
This works perfectly. I want to personally thank you for all you do on this board helping people like myself be more productive with our time.
Hi smoupre,
how would the formula look like if I wanted to filter for ranges? So Sales[Sales]>= 10275 and < 11969?
Thanks!
Right, so the filter clause can get complex quickly. So I believe something like this would work:
Intercompany Sales = CALCULATE(sum(Sales[Sales]),(Sales[Sales]>=10275 && Sales[Sales]<=11969) || Sales[Sales]=12875 || Sales[Sales]=50013)
So, that should be to include sales that are >= 10275 and <=11969 or exactly 12875 or exactly 50013
Hello @Greg_Deckler
I have the same issue, but I want to make it dynamic. For example, I have a slicer with 5 types of products and two measure:
SelectedProduct = FIRSTNONBLANK(Table[Product], Table[Product])
NumberProducts = CALCULATE(COUNTROWS(Table), FILTER(Table, Product=SelectedProduct))
What I want is the SelectedProduct to give me all(multiple) of the selected values from the slicer and calculate the NumberProducts for all of the selected. Please help me.
Thanks 🙂
 
					
				
				
			
		
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.
 
            | User | Count | 
|---|---|
| 84 | |
| 49 | |
| 36 | |
| 31 | |
| 30 |