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
garycarters
Helper I
Helper I

Card visual needs to show header value rather than summed by lines

I'm trying to do something that is probably quite simple but I can't get my head round.

 

I have a Card visual that shows the total cost for a data set, linked to a filter over Work Number.

 

The table behind the visual is a detail transaction listing codes allocated to each work number along with a cost (screenshot of example records attached) - there can be multiple records per worknumber. 

 

The actual cost is held per worknumber on a the header table and included in the detail as Column analysisActualPartsCost = RELATED(worksorderhdr[actual_parts_cost]) .

 

The problem I have is when i apply the filter the value of all the lines are summed, whereas in my example, when filtering by WO-020964 the visual should show a cost of 64.8, but instead it shows 3 x 64.8 (as there are 3 records).

 

 

 

 

1 ACCEPTED SOLUTION
v-piga-msft
Resident Rockstar
Resident Rockstar

Hi @garycarters ,

I'm a little confused about your scenario.

If I understans your total cost correctly that it is a measure like below.

 

total cost = CALCULATE(SUM('Table'[Cost]))

Capture.PNG

If so, I think the card behaviour is correct.

If you only want to show the 64.8 when the selectedvalue is WO-020964, you could use the measure like this.

total cost = CALCULATE(MAX('Table'[Cost]))

In addition, there are four records for 64.8 in your image.

If you still need help, free to ask and please share your data sample as table format so that we could have a test on it.

Best  Regards,

Cherry

Community Support Team _ Cherry Gao
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-piga-msft
Resident Rockstar
Resident Rockstar

Hi @garycarters ,

Have you solved the problem?

If you have solved, please always accept the replies making sense as solution to your question so that people who may have the same question can get the solution directly.

If you still need help, free to ask.

Best  Regards,

Cherry

Community Support Team _ Cherry Gao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
v-piga-msft
Resident Rockstar
Resident Rockstar

Hi @garycarters ,

I'm a little confused about your scenario.

If I understans your total cost correctly that it is a measure like below.

 

total cost = CALCULATE(SUM('Table'[Cost]))

Capture.PNG

If so, I think the card behaviour is correct.

If you only want to show the 64.8 when the selectedvalue is WO-020964, you could use the measure like this.

total cost = CALCULATE(MAX('Table'[Cost]))

In addition, there are four records for 64.8 in your image.

If you still need help, free to ask and please share your data sample as table format so that we could have a test on it.

Best  Regards,

Cherry

Community Support Team _ Cherry Gao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
garycarters
Helper I
Helper I

Capture.PNG

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.