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
Anonymous
Not applicable

Find value in matrix from other table and highlight

Hi guys

here is my issue :

I have a table which is a planning of audits : first column is the area, first line is the months of the year, and inside the matrix the name of the auditor.

I have another table which is the result of the audit, with the date, the area and the name of the auditor. 

What I want to achieve is :

Compare the results to the planning  : if the auditor made the audit at the right date in the right area, then highlight in green the cell and count 1 for the month. If not, red and 0

I am sure there is a clever measure to do this, but much too clever for me 🙂

if anyone could give a clue, I would appreciate

thanks

1 ACCEPTED SOLUTION
v-zhangti
Community Support
Community Support

Hi, @Anonymous 

 

You can try the following methods.

Sample data:

Plan:

vzhangti_0-1667873509431.png

Result:

vzhangti_1-1667873558169.png

vzhangti_2-1667873628489.png

Measure:

Measure =
CALCULATE (
    COUNT ( Result[Result] ),
    FILTER (
        ALL ( Result ),
        [Area] = SELECTEDVALUE ( Plan[Area] )
            && [Date] = SELECTEDVALUE ( Plan[Date] )
            && [Auditor] = SELECTEDVALUE ( Plan[Auditor] )
    )
) + 0
Color = IF([Measure]=1,"Green",IF([Measure]=0,"Red"))

vzhangti_3-1667873805839.pngvzhangti_4-1667873815927.png

Result:

vzhangti_5-1667873862064.png

Is this the result you expect?

Best Regards,

Community Support Team _Charlotte

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

5 REPLIES 5
Anonymous
Not applicable

Hi @v-zhangti !

thanks for your prompt and clear answer. Yes, this is something very close to what you got. Compared to your solution, it would be great if :

- the name of the auditor can be shown, instead of 1 or 0

- the one or zero are a bad way to calculate a % of completion of the planning per month, which I would like to have also

 

your measure is already a great step for me, I need now to understand it and try to achieve the last 2 points. If any idea, I'll take it !

thanks again

Makol76

Anonymous
Not applicable

@v-zhangti  : thanks to your measure, I was able to create the matrix with the names and the colors, and it works !! thanks !

Now, my colleague want to display a curve of completion % : ratio between audit done in time vs audits planified. Easy for the audits planified. But for the audits done in time, a bit trickier. The measure before works in a matrix, but how to get the same thing without matrix ? As an old Excel user, I thought creating a column with a concatenate of date/area/auditor on both planified and realized, and compare the 2, but it's a bit to "excel" I think.

thanks 

Hi, @Anonymous 

 

What kind of outcome do you expect? It can be expressed in Excel.

 

Best Regards,

Community Support Team _Charlotte

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Anonymous
Not applicable

Hi @v-zhangti 

I found a way using a unique key column and a measure with filter and related.

thanks again for your help !!

regards

makol76

v-zhangti
Community Support
Community Support

Hi, @Anonymous 

 

You can try the following methods.

Sample data:

Plan:

vzhangti_0-1667873509431.png

Result:

vzhangti_1-1667873558169.png

vzhangti_2-1667873628489.png

Measure:

Measure =
CALCULATE (
    COUNT ( Result[Result] ),
    FILTER (
        ALL ( Result ),
        [Area] = SELECTEDVALUE ( Plan[Area] )
            && [Date] = SELECTEDVALUE ( Plan[Date] )
            && [Auditor] = SELECTEDVALUE ( Plan[Auditor] )
    )
) + 0
Color = IF([Measure]=1,"Green",IF([Measure]=0,"Red"))

vzhangti_3-1667873805839.pngvzhangti_4-1667873815927.png

Result:

vzhangti_5-1667873862064.png

Is this the result you expect?

Best Regards,

Community Support Team _Charlotte

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

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.