Skip to main content
cancel
Showing results for 
Search instead 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

Reply
Jan845
Helper I
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

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

 

 

Thank you for all attention and help

1 ACCEPTED SOLUTION

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

View solution in original post

8 REPLIES 8
Jan845
Helper I
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?

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

JorgePinho
Solution Sage
Solution Sage

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

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 

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

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.

JorgePinho
Solution Sage
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)

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.

Helpful resources

Announcements
Fabric Community Conference

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.

February 2024 Update Carousel

Power BI Monthly Update - February 2024

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

Fabric Career Hub

Microsoft Fabric Career Hub

Explore career paths and learn resources in Fabric.

Fabric Partner Community

Microsoft Fabric Partner Community

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