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
I'm having trouble getting the correct value in the Grand Total using the below Measure.
Facility Active Days:=
SUMX('Facility Region', COUNTROWS(DISTINCT('Global Daily Census'[CensusDate])))
Facility Region is a dimension table with a one to many relationship to Global Daily Census.
I expect the measure to itirate the Faciility Region table, and count the distinct Date values for each facility and sum up the results.
the results display correctly when using the facilitiy names in the rows and each facility displayes the correct ammount of Unique date, However the grand total simply displays a multiplication of the total rows in the facility region table, times the largest unique count of the date column.
My model is built in SSAS tabular and the below is an excel snip of the result.
The Grand Total for Facility Active Days should have been 150, but it is displaying 186.
Thanks,
Solved! Go to Solution.
@SimonGoldPPG , Assuming your row label is region, Try like
SUMX(values('Facility Region'[Region]), calculate(COUNTROWS(DISTINCT('Global Daily Census'[CensusDate]))))
@SimonGoldPPG , Assuming your row label is region, Try like
SUMX(values('Facility Region'[Region]), calculate(COUNTROWS(DISTINCT('Global Daily Census'[CensusDate]))))
Adding Calculate worked.
Thanks,
Hi @SimonGoldPPG ,
Please update the formula of measure [Facility Active Days] as below and check if you can get the correct grand total values:
Facility Active Days :=
SUMX (
VALUES ( 'Facility Region'[Facilitiy Name] ),
COUNTROWS ( DISTINCT ( 'Global Daily Census'[CensusDate] ) )
)You can also refer the methods in the following links to resolve it.
Why Your Total Is Incorrect In Power BI - The Key DAX Concept To Understand
Obtaining accurate totals in DAX
Dax for Power BI: Fixing Incorrect Measure Totals
If you still can't get the correct result, please provide some sample data in your model(exclude sensitive data).
Best Regards
Rena
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 |
|---|---|
| 48 | |
| 43 | |
| 39 | |
| 19 | |
| 17 |
| User | Count |
|---|---|
| 69 | |
| 63 | |
| 32 | |
| 30 | |
| 23 |