Forum Discussion
ISINSCOPE and missing totals
Have tried lots of different ideas and cant get anything to work
I am plotting care home providers against geograhpic demographics so the providers are not part of the geographic hierachy.
I am ranking the LAs based on demogrpahics that the user can alter the weights on so they are measures not calcuated columns
My table looks like this where the LA score is not shown for provider name rows
AVG LA Rank Norm LIC = IF(ISINSCOPE(MSOA_Mapping[MSOA Name]) || ISINSCOPE(Providers[Provider Name]),BLANK(),
CALCULATE(
AVERAGEX(ADDCOLUMNS(SUMMARIZE(MSOA_Mapping,MSOA_Mapping[LA Name]),
"RankLA",[Area Score LA Norm LIC]),
[RankLA]))
)
I have slicer for LA Rank so I can pick a range say 4-4.5 and the table filters to just those LAs scoring that using this measure
Show LA Rank Norm LIC =
VAR
MSOAMax=MAX('MSOA Rank'[MSOA Rank Max])
VAR
MSOAMin=Min('MSOA Rank'[MSOA Rank Min])
VAR
LRNL=IF([AVG LA Rank Norm LIC]<=MSOAMax && [AVG LA Rank Norm LIC]>MSOAmin,[AVG LA Rank Norm LIC],BLANK())
RETURN
LRNL
However when I apply my slicer for 4-4.5 I get this. The LA Rank column has correctly removed any LA below 4 but also the total is no longer calcauted (I was execting the average of the remaining LAs i.e about 4.2). The 2nd column still has rows for every LA as not being filtered. Is it that the totla is still 2.6 so getting blanked i.e. the ISINSCOPE is just a visual thing?
Related question you can see I have site count which is by provider and it totlas for each LA. Again to stop the LA showing which were outside my filter i used
Show No Sites LIC =
VAR
MSOAMax=MAX('MSOA Rank'[MSOA Rank Max])
VAR
MSOAMin=Min('MSOA Rank'[MSOA Rank Min])
VAR
LRNL=IF([Area Score LA Norm LIC]<=MSOAMax && [Area Score LA Norm LIC]>MSOAmin,[Area Score LA Norm LIC],BLANK())
RETURN
IF(LRNL=BLANK() ,BLANK(),
[No Sites])this but agian total missing. Guessing same issue as LA Rank
Essentailly woudl like to see total row after applying my filter
Thanks any advice
Hi masplin,
Thank you for reaching out to Microsoft Fabric Community.
Here the issue is that the grand total is also evaluated against the filter condition. At the total level the measure returns the overall average (2.6), which is outside your selected range (4-4.5), so the measure returns blank.
To resolve this, handle the grand total separately instead of applying the same IF logic used for individual LA rows. Recalculate the total using only the LA’s that meet the selected rank range and the same approach applies to the No Sites measure also.
Thanks and regards,
Anjan Kumar Chippa
2 Replies
- v-achippaCommunity Support
Hi masplin,
Thank you for reaching out to Microsoft Fabric Community.
Here the issue is that the grand total is also evaluated against the filter condition. At the total level the measure returns the overall average (2.6), which is outside your selected range (4-4.5), so the measure returns blank.
To resolve this, handle the grand total separately instead of applying the same IF logic used for individual LA rows. Recalculate the total using only the LA’s that meet the selected rank range and the same approach applies to the No Sites measure also.
Thanks and regards,
Anjan Kumar Chippa