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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
dkernen
Resolver II
Resolver II

Card not reflecting slicer/filter

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



@

1 ACCEPTED SOLUTION
v-henryk-mstf
Community Support
Community Support

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 )

vhenrykmstf_1-1643773289440.png

 

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.

View solution in original post

3 REPLIES 3
v-henryk-mstf
Community Support
Community Support

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 )

vhenrykmstf_1-1643773289440.png

 

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.

Daryl-Lynch-Bzy
Resident Rockstar
Resident Rockstar

@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 

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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