Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
I see other posts similar to mine but I cannot discern the difference.
I have a disconnected table to create subsets for which my users can select. The subsets work great for my bar chart and my line charts, but the cards do not work. I understand that is because cards don't have context, but I don't know how to solve it.
My disconnected table: selectCollection
My filter to choose only specified rows: Collection Filter
My count for total records: Cases by Collection
I am using healthcare data. In my example, the musculoskeletal records should vary when the user selects "Eye Donors" vs "Tissue Donors" but the slicer isn't reflected in the counts of Musculoskeletal Donors (or any of the other aggregates). Can you please help me understand how to solve? The Musculoskeletal counts DO correctly change in the line chart. And the total counts correctly vary in the bar chart. I need a way to get the summary stats for overall (currently in the card) to be correct. I am stumped!
https://mwtn-my.sharepoint.com/:u:/g/personal/dkernen_mwtn_org/EdiYB2gyBuBEqPpt5-VKGKEB9NMP8fN8omsRa...
@cards, @disconnectedtables
@
Solved! Go to Solution.
Hi @dkernen ,
According to your description, the cards are customized in the MEASURE conditions applied on the card, and do not apply the slicer's filter results to the judgment conditions. The fields that are used individually as filters have to have corresponding fields corresponding to them in the calculated model.
Cases by Tissue First Incision Date =
CALCULATE (
[Cases],
USERELATIONSHIP ( v_dimDate[DateID], factCase[TIncision_DateID] )
)
Tissue Donors =
CALCULATE ( [Cases by Tissue First Incision Date], dimTDisp[TRecovered_N] = 1 )
The following modifications to the formula are required, for example:
Tissue Donors =
CALCULATE (
[Cases by Tissue First Incision Date],
dimTDisp[TRecovered_N] = 1
&& dimODisp[CollectionID ] = SELECTEDVALUE ( selectCollection[Collection] )
)
If the problem is still not resolved, please provide detailed error information. Looking forward to your feedback.
Best Regards,
Henry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @dkernen ,
According to your description, the cards are customized in the MEASURE conditions applied on the card, and do not apply the slicer's filter results to the judgment conditions. The fields that are used individually as filters have to have corresponding fields corresponding to them in the calculated model.
Cases by Tissue First Incision Date =
CALCULATE (
[Cases],
USERELATIONSHIP ( v_dimDate[DateID], factCase[TIncision_DateID] )
)
Tissue Donors =
CALCULATE ( [Cases by Tissue First Incision Date], dimTDisp[TRecovered_N] = 1 )
The following modifications to the formula are required, for example:
Tissue Donors =
CALCULATE (
[Cases by Tissue First Incision Date],
dimTDisp[TRecovered_N] = 1
&& dimODisp[CollectionID ] = SELECTEDVALUE ( selectCollection[Collection] )
)
If the problem is still not resolved, please provide detailed error information. Looking forward to your feedback.
Best Regards,
Henry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@dkernen - Have you considered using a Calculation Group / Calculation Item instead?
Yes - I have other calculation groups in my PBIX. I don't understand how to write this one though, since it works on the non-card visuals. Are you able to help me with the DAX?
I have tried this, but I am getting errors:
Dermis Donors Collection =
VAR AllCasesByCollection =
SWITCH(
SELECTEDVALUE(selectCollection[Collection_ID]),
11,CALCULATETABLE(dimReferral,dimReferral[OutcomeTE]<>"~~"),
12,CALCULATETABLE(dimReferral,LEFT(dimReferral[OutcomeTE],1)="T"),
13,CALCULATETABLE(dimReferral,RIGHT(dimReferral[OutcomeTE],1)="E"))
RETURN
CALCULATE(
[Dermis Donors],
AllCasesByCollection)
(I think once I figure out how to make the filter table work, then I could move it to the Calculation Groups - but I need the correct DAX first.)
@Daryl-Lynch-Bzy
User | Count |
---|---|
127 | |
108 | |
100 | |
63 | |
62 |
User | Count |
---|---|
136 | |
113 | |
102 | |
71 | |
60 |