cancel
Showing results for
Did you mean:

The ultimate Microsoft Fabric, Power BI, Azure AI & SQL learning event! Join us in Las Vegas from March 26-28, 2024. Use code MSCUST for a \$100 discount. Register Now

Helper I

## Count number of items

Hi Sir's

I need to calculate on the "TAG" collumn these things:

• Calculate total number of each tag (example : in collumn "TAG" i have "512A" three times in total values of the collumn. ( i need to make a measure to calculate number of total each value) , so if i have 75 unique values i need to create 75 measures?

TYPE                TAG

 T1 LX,501 T1 LX,512A T1 LX,512A T1 LX,512A T1 PO,521B T1 LX,A3 T1 LX,132 T1 LX,512B T1 PO,511 T1 PO,323 T1 PO,515 T1 PO,232 T1 PO,516 T1 PO,513 T1 PO,19 T1 PO,531 T1 LX,514 T1 LX,441 T1 LX,521 T1 LX,SP T1 PO,134 T1 LX,A1 T1 LX,ASF T1 LX,3511 T1 PO,520A T1 PO,533

Thank you for all attention and help

1 ACCEPTED SOLUTION
Solution Sage

Yes. You can create a conditional column with multiple conditions in Power Query Editor!

8 REPLIES 8
Helper I

Dear @JorgePinho

Good morning.

What if I created a custom column where I would look for the tags of each row and create a column for location (LX,PO) and another for the value of the number of rooms (512A, 501, etc...) It is possible to filter , but the issue is not always the order of tags is first the location and then number can also be vice versa. Is there a way to create a custom column in which if the value of that tag line is = to several conditions it writes in the new column?

Solution Sage

Yes. You can create a conditional column with multiple conditions in Power Query Editor!

Solution Sage

Each line has multiple tags separated by a comma? Is that it?

Helper I

Yes , correct. The collumn "TAG" have multipla tags separated by a comma, i need to make a sum of values for each value (example : in collumn "TAG" i have "512A" three times in total values of the collumn.)

I will create one Filter with card with total value for each value TAG excluding the LX and PO

Solution Sage

Can we change that and put only one tag in each line? It's pretty easy using power query

Helper I

Yes it is an alternative, but as I export the data from another table and paste it here it is much easier and automatic to have it this way, I didn't want to have too much trouble updating the data to another table column manually, but if there is no way to calculate it this way we can use this way.

Solution Sage

Do you really need to create a measure? You can see that using a table with two fields:

TAG (no summarization)

TAG(Count)

Helper I

Sorry I sent the wrong table, I corrected the table, I in the same column have several tags separated by commas. I corrected the values again.

Announcements

#### Microsoft Fabric Community Conference

Join us at our first-ever Microsoft Fabric Community Conference, March 26-28, 2024 in Las Vegas with 100+ sessions by community experts and Microsoft engineering.

#### Power BI Monthly Update - February 2024

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

#### Microsoft Fabric Career Hub

Explore career paths and learn resources in Fabric.

#### Microsoft Fabric Partner Community

Engage with the Fabric engineering team, hear of product updates, business opportunities, and resources in the Fabric Partner Community.

Top Solution Authors
Top Kudoed Authors