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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply

Understanding DAX

Generally speaking, if I create a measure that, when added to a multi-level (hierarchically built) matrix, displays the correct values on each row, is it 100% safe to say that in a graph or kpi that it will aggregate correctly?

For example, I have sales data with salesperson and date for each transaction. I have another table with salesperson, date (start of quarter) and quota. I created (I think) a measure that calculates variance to quota for each quarter for each salesperson.

When I create a matrix with rows sales person > year > quarter and values sales and quota, if I add my variance measure it displays the correct values (quota - sales) for each salesperson for each quarter. Can I be confident that my measure is correctCapture.PNG

 

In the image above, the Sales and Quota values are from the raw data (a sales table and a quota table with salesperson key) and both tables are linked to a date table.  I calculated Variance to Quota as simply CALCULATE([Total Sales]-SUM(Quotas[SalesAmountQuota])).

 

It seems too simple a measure to be correct, but I imagine that the relationships with date allow the measure to calculate properly?

1 REPLY 1
v-shex-msft
Community Support
Community Support

Hi @dkay84_PowerBI,

 

The matrxi visual will auto summary data based on columns and rows. If your measure hasn't add some filter, it will work with these summaried data.

 

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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