POWER BI: Modeling

Calculate Function:


Example Formulas:

Write the following measures in the formula bar:

            Large Transactions = CALCULATE(
                                     SUM(TransactionData[Revenue]),
	                                 TransactionData[Revenue] > 10000
	                            )
                
                 Large Transactions & Mid_Budget = CALCULATE(
                                                 SUM(TransactionData[Revenue]),
	                                             TransactionData[Revenue] > 10000, 
	                                             Advertising[Ad Budget] = "medium" 
	                                            )
	            
                  Large Transactions & mid_or_small Spend  = CALCULATE(
                                                     
                     SUM(TransactionData[Revenue]),
	                 TransactionData[Revenue] > 10000, 
	                 Advertising[Ad Budget] = "medium" || Advertising[Ad Budget] = "small"
	                 )
                 
Power BI Demo:

Explanation:

Since there is a filter on ad budget from the CALCULATE function, the slicer on the report has no effect on the measure. The ad source slicer does change all three measures however, since there was no filter on the ad source column in CALCULATE.


Dash-Intel is a Power BI and Tableau resource site for data visualization and building BI dashboards.

Data Analyst & Consultant

Copyright 2015-2023 Dash-Intel.com Terms