Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Anonymous
Not applicable

Variance by Contracts

Variance by Customer Name:

I have listing of contracts that are tied to 2% rebates.    The Matrix I have "Variance by Customer Name" shows variances.  Variance is calculated this way: Forecated Revenue - Recognized Revenue = Variance

Most contracts that have variance are tied to rebates, however there are few that are not.  In my matrix I only want to display contracts that are not associated to rebates.   I have upload the list of contracts with rebates to Query editor and mapped the relationship.

 

I want to create a measure that I can apply to my existing Matrix "Variance by Customer Name" that will exclude rebate contracts  and keep the remaining as variance.  Need help with DAX measurement.

7 REPLIES 7
Anonymous
Not applicable

@Anonymous 

 

If you put contracts (like ContractID or Contract Name) in a matrix, then you should create a measure that will return 1 when a contract has a rebate and 0 when it doesn't. Then use the measure to filter out the contracts without rebates using the Filter Pane for the visual. This is how you get rid of certain contracts - by creating a filtering measure.

Anonymous
Not applicable

Contract on rebate:

Contact NUM CST00321464, Contract Name Northside Hospital, contract has rebate of 2%

Contract NUM CST000123460, Contract Name Piedmond Clinic, contract has no rebate

 

Data sample:

Contact NUM CST00321464  

Northside Hospital

Forecasted Revenue (mnthly) = 15,000

Recognized Revenue (mnthly) = 12,800

Variance between FCST - Recog Rev = 2,200

Since the contract is tied to rebate, I would like to see it excluded

 

Contract NUM CST000123460

Piedmond Clinic

Forecasted Revenue (mnthly) = 30,000

Recognized Revenue (mnthly) = 24,800

Variance between FCST - Recog Rev = 5,200

Since the contract is tied no rebate, Do not exclude from the output

 

Output results: Focus on this contract and determine why the variance occured

Contract NUM CST000123460

Piedmond Clinic

Forecasted Revenue (mnthly) = 30,000

Recognized Revenue (mnthly) = 24,800

Variance between FCST - Recog Rev = 5,200

 

Measure I have in current Matrix:
Variance Forecasted - Recognized I = [Recognized Revenue I] - [Forecasted Revenue]
 
Anonymous
Not applicable

@Anonymous 

 

You can easily paste an excel table straight into the body of the message... so please do it.

Anonymous
Not applicable

That did not work daxer.

Anonymous
Not applicable

Amit,  I have tried serveral time to post the sample data and output to provide you.  Keep receiving the following error message.

Your post has been changed because invalid HTML was found in the message body. The invalid HTML has been removed. Please review the message and submit the message when you are satisfied.

 

Any idea on how I can fix the error.

amitchandak
Super User
Super User

@Anonymous ,Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

Amit,  I have created new DAX measure, which is not excluding contract that have rebate.

 

Current measure: Variance Forecasted - Recognized I = [Recognized Revenue I] - [Forecasted Revenue].  Which is including all contracts.

 

New measure:

Variance Rebates = CALCULATE(
[Variance Forecasted - Recognized I],
(ALLEXCEPT('Reference - Rebates','Reference - Rebates'[Number])
))
The issue is it's not filtering out  the contract that have rebate tied to it.

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.