Don't miss your chance to take the Fabric Data Engineer (DP-600) exam for FREE! Find out how by attending the DP-600 session on April 23rd (pacific time), live or on-demand.
Learn moreNext up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now
Hi – really hoping someone can help me out here. I’m encountering an issue with matrix totals not being correct and my typical HASONEFILTER fix doesn’t seem to be working (I’m probably just not applying it correctly). I’m desperate to get this fixed, as it’s affecting timelines of other projects.
This is the measure:
Contact_Count_Year_Start =
IF(
SUM('CONTACT'[CONTACT_COUNT])>0,
CALCULATE(
SUM('CONTACT'[CONTACT_COUNT]),
STARTOFYEAR(DIM_DATE[DATE]
),BLANK()
)
I effectively only want to display a contact count for the beginning of the year if the sum of my contact counts are blank in the matrix. The total in this case is ignoring the IF statement in my measure and returning 4 as if it wasn’t there at all (returning 9 total). Any ideas how to fix this? Thanks!
Solved! Go to Solution.
You have to do this
IF(
SUM('CONTACT'[CONTACT_COUNT])>0,
for each division. Use SUMX and/or SUMMARIZE.
Think like the Grand Total. Very often measures designed for the Grand Total will also work for the Row and Column Totals and for the individual cells.
You have to do this
IF(
SUM('CONTACT'[CONTACT_COUNT])>0,
for each division. Use SUMX and/or SUMMARIZE.
Think like the Grand Total. Very often measures designed for the Grand Total will also work for the Row and Column Totals and for the individual cells.
Thanks! I solved it using the below (prefixing the code with a SUMX(VALUES(...)). Does this work because I'm basically saying "perform this calculation for every instance of ACCOUNT_NAME, then iterate through all account names"?
Contact_Count_Year_Start =
SUMX(
VALUES('CONTACT'[ACCOUNT_NAME]),
IF(
SUM('CONTACT'[CONTACT_COUNT])>0,
CALCULATE(
SUM('CONTACT'[CONTACT_COUNT]),
STARTOFYEAR(DIM_DATE[DATE]
),BLANK()
))
yes.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 43 | |
| 43 | |
| 38 | |
| 18 | |
| 15 |
| User | Count |
|---|---|
| 67 | |
| 63 | |
| 30 | |
| 30 | |
| 23 |