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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
darrennhg
Frequent Visitor

How to create a Summary Box

darrennhg_0-1642957326900.png

Hi guys I'm trying to create a summary box above my table  that changes colour or shows a tick or cross depending on whether everything listed in my table for that day is working fine. For example: If all the servers on Thursday switched on Successfully then we'll a green box or a tick and if even one server fails on Saturday then thats a red box or cross. I've been trying to use the card visual to create whats in my head, but I can't seem to figure it out.

 

darrennhg_0-1642962103764.png

Similar to this.

 

Apologies if I haven't explained this well.

 

Thanks in advance!

1 ACCEPTED SOLUTION

Hi @darrennhg 

Thanks for your reply.

If you want to create summary for every single server, you can make adjustments on the sample file I attached, their calculation logic is similar.

Have I solved your question? Could you accept my answer as the solution? Thanks for your contribution to improve Power BI.❤️

 

Best Regards,

Community Support Team _Tang

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

View solution in original post

7 REPLIES 7
v-xiaotang
Community Support
Community Support

Hi @darrennhg 

I forgot to say, you have to unpivot the data first, then remove "()" in date column,

let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WCk4tKkstUjA0MlbSUQouTU5OLS4mi6WrFKsDN87IgJqmmVniUBWeWJSXmZdOomlmQBG3xMyc1BQSjMBhmCVqsMGNhTOIMzU2FgA=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [#"Backup Server Name" = _t, #" (30/12/2021)" = _t, #" (31/12/2021)" = _t, #" (01/01/2022)" = _t, #" (02/01/2022)" = _t, #" (03/01/2022)" = _t, #" (04/01/2022)" = _t, #" (05/01/2022)" = _t]),
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"Backup Server Name", type text}, {" (30/12/2021)", type text}, {" (31/12/2021)", type text}, {" (01/01/2022)", type text}, {" (02/01/2022)", type text}, {" (03/01/2022)", type text}, {" (04/01/2022)", type text}, {" (05/01/2022)", type text}}),
    #"Unpivoted Columns" = Table.UnpivotOtherColumns(#"Changed Type", {"Backup Server Name"}, "Attribute", "Value"),
    #"Split Column by Positions" = Table.SplitColumn(#"Unpivoted Columns", "Attribute", Splitter.SplitTextByPositions({0, 2, 12}), {"Attribute.1", "Attribute.2", "Attribute.3"}),
    #"Changed Type1" = Table.TransformColumnTypes(#"Split Column by Positions",{{"Attribute.1", type text}, {"Attribute.2", type text}, {"Attribute.3", type text}}),
    #"Removed Columns" = Table.RemoveColumns(#"Changed Type1",{"Attribute.1", "Attribute.3"}),
    #"Changed Type with Locale" = Table.TransformColumnTypes(#"Removed Columns", {{"Attribute.2", type date}}, "en-HK"),
    #"Renamed Columns" = Table.RenameColumns(#"Changed Type with Locale",{{"Attribute.2", "Date"}})
in
    #"Renamed Columns"

vxiaotang_1-1643712883697.png

 

Best Regards,

Community Support Team _Tang

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

v-xiaotang
Community Support
Community Support

Hi @darrennhg 

please provide more details, so that we can work on further,

(1) a sample file, you can replace raw data with bogus data to protect your privacy.

(2) or provide some sample data that fully covers your issue/question

(3) give your expected result based on the sample you provide

Kindly note: Please ensure the data in sample is concise and representative.

Thanks.

 

Best Regards,

Community Support Team _Tang

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

Backup Server NameThursday
 (30/12/2021)
Friday
 (31/12/2021)
Saturday
 (01/01/2022)
Sunday
 (02/01/2022)
Monday
 (03/01/2022)
Tuesday
 (04/01/2022)
Wednesday
 (05/01/2022)
Server 123SuccessSuccessSuccessSuccessSuccessSuccess-
Server 20SuccessSuccessSuccessSuccessSuccessSuccess-
Server 69SuccessSuccessWarningSuccessSuccessSuccess-
Server 66FailedWarningSuccessSuccessSuccessSuccess

-

Server 93SuccessFailedFailedSuccessSuccessSuccess

Success

 

Hi,

 

Above is a sample of the data as you can see many days were successful but on the few occasions there were  failed server runs and some warnings. What I want is an interactive card that reflects the server status for that day for every single server. For example: Thursday will be a fail because Server 66 failed, Friday will also be a fail because there is a warning whereas Sunday will be a success because all servers ran successfully on the day.

 

darrennhg_0-1643677820952.png

 Here is an example of what I want it to look like!

 

Hi @darrennhg 

Try this, create 2 measures, 

Status = 
VAR _date =
    SELECTEDVALUE ( 'Table'[Date] )
VAR _status =
    DISTINCT ( 'Table'[Value] )
RETURN
    IF (
        CONTAINS ( DISTINCT ( 'Table'[Value] ), 'Table'[Value], "Failed" )
            || CONTAINS ( DISTINCT ( 'Table'[Value] ), 'Table'[Value], "Warning" ),
        "Unsuccess",
        "Success"
    )
Color = 
VAR _date =
    SELECTEDVALUE ( 'Table'[Date] )
VAR _status =
    DISTINCT ( 'Table'[Value] )
RETURN
    IF (
        CONTAINS ( DISTINCT ( 'Table'[Value] ), 'Table'[Value], "Failed" )
            || CONTAINS ( DISTINCT ( 'Table'[Value] ), 'Table'[Value], "Warning" ),
        "White",
        "#68B56B"
    )

 

then change the setting of Card visual,

vxiaotang_1-1643712566263.png

result:

vxiaotang_0-1643712503345.pngvxiaotang_2-1643712621274.png

Best Regards,

Community Support Team _Tang

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

Thank you very much! Although this helps for individual servers on the day rather than a summary for every single server combined for the day.

Hi @darrennhg 

Thanks for your reply.

If you want to create summary for every single server, you can make adjustments on the sample file I attached, their calculation logic is similar.

Have I solved your question? Could you accept my answer as the solution? Thanks for your contribution to improve Power BI.❤️

 

Best Regards,

Community Support Team _Tang

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

vanessafvg
Super User
Super User

can you provide data in a text format.





If I took the time to answer your question and I came up with a solution, please mark my post as a solution and /or give kudos freely for the effort 🙂 Thank you!

Proud to be a Super User!




Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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