Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more
Hi,
How can I create a case stament in Power BI to group specific rows.
I would like to create a pie chart or a bar chart that shows the status of customer's content by 3 categories -
1) On Hold
2)In Process
3)Completed (if the second column in the sample data below contains a url).
In a case statement I would have done something like this -
CASE
WHEN `Customer` LIKE "in pocess%" THEN "WIP"
WHEN `Customer1 LIKE "%HTTPS%" THEN "Completed"
ELSE
NA
How can I perform a similar query in Power BI?
Here's some sample data.
| Customer Name | Link to content | 
| A1 | on hold | 
| B1 | https://lorenipsum1111 | 
| C1 | on hold - needs funding | 
| D1 | https://lorenipsum2222 | 
| E1 | in process - waiting for location | 
| F1 | in process | 
Appreciate your help.
Solved! Go to Solution.
Hi @saipawar ,
We can create a calculated column to meet your requirement:
Category =
IF (
    CONTAINSSTRING (
        [Link to content],
        "in process"
    ),
    "WIP",
    IF (
        CONTAINSSTRING (
            [Link to content],
            "https"
        ),
        "Completed",
        "NA"
    )
)
Best regards,
Hi @saipawar ,
We can create a calculated column to meet your requirement:
Category =
IF (
    CONTAINSSTRING (
        [Link to content],
        "in process"
    ),
    "WIP",
    IF (
        CONTAINSSTRING (
            [Link to content],
            "https"
        ),
        "Completed",
        "NA"
    )
)
Best regards,
Look into FIND or SEARCH dax commands and use them in SWITCH.
https://docs.microsoft.com/en-us/dax/search-function-dax
https://docs.microsoft.com/en-us/dax/find-function-dax
If it helps, mark it as a solution
Kudos are nice too.
Hi @VasTg
Should I create a new measure for this? can you give me an example of the query?
I am a newbie to DAX and some direction would definitely help.
 
					
				
				
			
		
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.
