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

The Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.

Reply
Chaithrar
New Member

Converting measure into calculated column

Hi, 


I am having issue to use measure in chart , filter visuals. Measure is giving me the correct result but I need to use it as bar chart, how to convert measure to calculated column.

4 REPLIES 4
Chaithrar
New Member

How can I use this measure in a bar chart to show number of items in respective status

Pragati11
Super User
Super User

HI @Chaithrar ,

 

Can you share your measure definition here please?

 

Best Regards,

Pragati Jain


MVP logo


LinkedIn | Twitter | Blog YouTube 

Did I answer your question? Mark my post as a solution! This will help others on the forum!

Appreciate your Kudos!!

Proud to be a Super User!!

Thanks for responding. 

I have individaul measures where the calculation has been done and then there is a "Overall Status" measure where I am using Switch to use individual measures to return the result. 

Overall  Status =

SWITCH
(
    TRUE(),
    [Blank Type] > 0, "Template Missing",
    [Missing Criteria] > 0, " Criteria Missing",
    [Blank Due Date] > 0 , "Task(s) Missing",
    [Overdue] > 0 , "Overdue",
    [ Plan Overdue] > 0 , " Plan Overdue",
    [ Plan Found] > 0 , " Planned",
    [Due In 2 Weeks] > 0 , "Due in 2 Weeks",
    [Due In 4 Weeks] > 0 , "Due in 4 Weeks",
    [Due After 4 Weeks] > 0 , "Due after 4 Weeks",
    [Incomplete] > 0, "Gateway Key Task(s) Incomplete",  -- Incomplete Key Task
    [Exception] > 0, "Completed-With Exception(s)",
    "Completed"
)

 

 

Hi @Chaithrar 

You can refer to the following solution.

1.Put the status to a new table

e.g 

vxinruzhumsft_0-1693290581882.png

 

2.Then create the measure 

e.g 

Switch_measure =
VAR a =
    ADDCOLUMNS (
        'Table (2)',
        "judge",
            SWITCH (
                TRUE (),
                [Sum] >= 10
                    && [Sum] < 40, "a",
                [Sum] >= 40
                    && [Sum] < 60, "b",
                [Sum] >= 60, "c"
            )
    )
RETURN
    COUNTROWS ( FILTER ( a, [judge] IN VALUES ( 'Table'[Type] ) ) )

3.Put the status and measure to the related visual

vxinruzhumsft_1-1693290709580.png

 

Best Regards!

Yolo Zhu

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

Helpful resources

Announcements
Feb2025 Sticker Challenge

Join our Community Sticker Challenge 2025

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

Jan NL Carousel

Fabric Community Update - January 2025

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