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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Noak
Helper IV
Helper IV

Calculate table

Hey guys I need your help,

I have the following sample data:

SubscriberIDCategoryAccountIDVNumberInstalldate482242
107817322152361161140112/1/2017 0:000100
107862022152361162190112/6/2017 0:000100
107862222152361162170112/6/2017 0:000100
107862922152361162090112/6/2017 0:000100
107863022152361162380112/6/2017 0:000100
107863122152361161160112/6/2017 0:000100
10786374152361162120112/6/2017 0:000010
10786384152361162160112/6/2017 0:000010
107864048152361160260112/7/2017 0:001000
107864822152361162140112/7/2017 0:000100

 

(for one vnumber we can have several category types)

I would like to have finall result table with the following columns:

Vnumbe | category22 | category48 | category4 | if(category22=1 && category48=1 && category4=1  , Important, Regular)

 

 

any tips.tricks?...

BR,
Noa.
1 ACCEPTED SOLUTION
v-ljerr-msft
Employee
Employee

Hi @Noak,

 

If I understand you correctly, the formula below should work in your scenario. Smiley Happy

Table =
ADDCOLUMNS (
    SUMMARIZE (
        Table1,
        Table1[VNumber],
        "22", COUNTROWS ( FILTER ( Table1, Table1[Category] = 22 ) )
            + 0,
        "48", COUNTROWS ( FILTER ( Table1, Table1[Category] = 48 ) )
            + 0,
        "4", COUNTROWS ( FILTER ( Table1, Table1[Category] = 4 ) )
            + 0
    ),
    "Type", IF ( [22] = 1 && [48] = 1 && [4] = 1, " Important", "Regular" )
)

t2.PNG

 

Regards

View solution in original post

1 REPLY 1
v-ljerr-msft
Employee
Employee

Hi @Noak,

 

If I understand you correctly, the formula below should work in your scenario. Smiley Happy

Table =
ADDCOLUMNS (
    SUMMARIZE (
        Table1,
        Table1[VNumber],
        "22", COUNTROWS ( FILTER ( Table1, Table1[Category] = 22 ) )
            + 0,
        "48", COUNTROWS ( FILTER ( Table1, Table1[Category] = 48 ) )
            + 0,
        "4", COUNTROWS ( FILTER ( Table1, Table1[Category] = 4 ) )
            + 0
    ),
    "Type", IF ( [22] = 1 && [48] = 1 && [4] = 1, " Important", "Regular" )
)

t2.PNG

 

Regards

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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