Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more.
Get startedGrow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.
Hello
Can you tell me please how to use the CALCULATE formula with multiple OR/AND criteria?
Thanks!
Solved! Go to Solution.
When you add two filters to the CALCULATE Function, this is equavalient to using AND. So if you wanted to get the Direct or Referral Channels. You will need to use the || to create OR in CALCULATE and FILTER
Direct OR Refferal Sessions = CALCULATE(SUM('All Web Site Data'[Sessions]), FILTER('All Web Site Data','All Web Site Data'[Default Channel Grouping]="Direct" || 'All Web Site Data'[Default Channel Grouping]="Referral"))
When you want to use the OR condition, Use FITLER with CALCULATE.
@UsePowerBI , you have AND and OR function
You can use && for and; and || for or
example = calculate([measure],filter(Table, Table[A] =1 || Table[B] ="A"))
When you add two filters to the CALCULATE Function, this is equavalient to using AND. So if you wanted to get the Direct or Referral Channels. You will need to use the || to create OR in CALCULATE and FILTER
Direct OR Refferal Sessions = CALCULATE(SUM('All Web Site Data'[Sessions]), FILTER('All Web Site Data','All Web Site Data'[Default Channel Grouping]="Direct" || 'All Web Site Data'[Default Channel Grouping]="Referral"))
When you want to use the OR condition, Use FITLER with CALCULATE.
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
User | Count |
---|---|
91 | |
89 | |
79 | |
69 | |
68 |
User | Count |
---|---|
222 | |
128 | |
117 | |
82 | |
77 |