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

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. 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
November Carousel

Fabric Community Update - November 2024

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

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

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