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
Nazeem81
Helper I
Helper I

Create groups

Hi,

 

If I have an invoice status column that contains data such as invoiced, not invoiced, on hold, paused: Is it possible to create one group with invoiced and not invoiced and a second group with invoiced, on hold and paused? Possible to have invoiced in both groups?

 

 

 

BR

Nazeem

1 ACCEPTED SOLUTION
v-yulgu-msft
Employee
Employee

Hi @Nazeem81,

 

In 'Input' table, add two calculated columns:

Group1 = IF(Input[Invoice status]="Invoiced"||Input[Invoice status]="Not invoiced","Group1")

Group2 = IF(Input[Invoice status]="Invoiced"||Input[Invoice status]="On hold"||Input[Invoice status]="Paused","Group2")

1.PNG

 

Then, new a calculated table as below:

Output_1 =
UNION (
    SELECTCOLUMNS (
        FILTER ( Input, Input[Group1] <> BLANK () ),
        "Date", Input[Date],
        "Invoice Number", Input[Invoice number],
        "Invoice Status", Input[Invoice status],
        "Group", Input[Group1]
    ),
    SELECTCOLUMNS (
        FILTER ( Input, Input[Group2] <> BLANK () ),
        "Date", Input[Date],
        "Invoice Number", Input[Invoice number],
        "Invoice Status", Input[Invoice status],
        "Group", Input[Group2]
    )
)

2.PNG

 

Use a Matrix to display data from 'Output_1'.

3.PNG

 

Best regards,

Yuliana Gu

Community Support Team _ Yuliana Gu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

5 REPLIES 5
v-yulgu-msft
Employee
Employee

Hi @Nazeem81,

 

In 'Input' table, add two calculated columns:

Group1 = IF(Input[Invoice status]="Invoiced"||Input[Invoice status]="Not invoiced","Group1")

Group2 = IF(Input[Invoice status]="Invoiced"||Input[Invoice status]="On hold"||Input[Invoice status]="Paused","Group2")

1.PNG

 

Then, new a calculated table as below:

Output_1 =
UNION (
    SELECTCOLUMNS (
        FILTER ( Input, Input[Group1] <> BLANK () ),
        "Date", Input[Date],
        "Invoice Number", Input[Invoice number],
        "Invoice Status", Input[Invoice status],
        "Group", Input[Group1]
    ),
    SELECTCOLUMNS (
        FILTER ( Input, Input[Group2] <> BLANK () ),
        "Date", Input[Date],
        "Invoice Number", Input[Invoice number],
        "Invoice Status", Input[Invoice status],
        "Group", Input[Group2]
    )
)

2.PNG

 

Use a Matrix to display data from 'Output_1'.

3.PNG

 

Best regards,

Yuliana Gu

Community Support Team _ Yuliana Gu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Greg_Deckler
Super User
Super User

Potentially, yes. But tough to say with the information provided:

 

Please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Mastering Power BI 2nd Edition

DAX is easy, CALCULATE makes DAX hard...

Hi,

 

Thanks for the reply. What more information do you need?

 

 

BR

Ammar

Sample/example input data and then example/sample of output is always helpful.


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Mastering Power BI 2nd Edition

DAX is easy, CALCULATE makes DAX hard...

Hi,

 

See link below for sample in excel, thanks.

 

https://ufile.io/8pd86

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.