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
Anonymous
Not applicable

Calculated dimension based on value

HI,

 

I have the following source dataset.

DateEmployee nameProject nameClient billableInternal Product billableUtilization hours(non Billable)
17-05-2019Aamitek30010
17-05-2019BMalvern40 0
17-05-2019CKendal0400
17-05-2019DQuva10040

 

A employee :
Client billable hours value less than 40 and greater than 0, it falls the category like Partially client billable
utilization hours less than 40, it falls the category like partially non-billable

B employee:
Fully client billable

C Employee:
Fully Internal billable

D Employee:
Partially Client Billable, Fully non-billable

Particular employee falls in many categories.

 

I want  to show the categories in a pie chartScreenshot_3.png

How can I achieve this one?

 

 

Note: Employee name is unique

I have the one-week data set only, for one week target working hours is 40. based on that value we need to categorize the billing status

 

 

 

 

1 ACCEPTED SOLUTION

Hi @Anonymous 

You may use DAX to create the unpivot table.Then use the workaround as above.Check Table 2 in sample file.

Table 2 = 
UNION (
    SELECTCOLUMNS (
        'Data',
        "Date", 'Data'[Date],
        "Name", 'Data'[Employee name],
        "Internal Product billable", 'Data'[Internal Product billable],
        "Attribute", 'Data'[Column],
        "Value", 'Data'[Client billable]
    ),
    SELECTCOLUMNS (
        'Data',
        "Date", 'Data'[Date],
        "Name", 'Data'[Employee name],
        "Internal Product billable", 'Data'[Internal Product billable],
        "Attribute", 'Data'[Column 2],
        "Value", 'Data'[Utilization hours(non Billable)]
    )
)

Regards,

Community Support Team _ Cherie Chen
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

6 REPLIES 6
v-cherch-msft
Employee
Employee

Hi @Anonymous 

You may use 'Unpivot column' for Client billable and 'Utilization hours(non Billable)' columns in query editor first.Then create a column with IF condition.Use the column as legend and create a measure to get the count.For example:

Column = 
IF (
    'Table'[Internal Product billable] = 40,
    "Fully Internal billable",
    IF (
        'Table'[Attribute] = "Client billable",
        IF (
            'Table'[Value] < 40
                && 'Table'[Value] > 0,
            "Partially client billable",
            IF ( 'Table'[Value] = 40, "Fully client billable" )
        ),
        IF (
            'Table'[Attribute] = "Utilization hours(non Billable)",
            IF (
                'Table'[Value] < 40
                    && 'Table'[Value] > 0,
                "partially non-billable",
                IF ( 'Table'[Value] = 40, "Fully non-billable" )
            )
        )
    )
)

Regards,

Community Support Team _ Cherie Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

Hi,

I suppose, your suggestion won't work here.
Below is my source dataset,

 

Screenshot_1.png

I'm running the summarize DAX query on the above table to create another table, the structure of which is above post, however, this table is not being available in the power query window. Please suggest.

 

Every  Friday, data are inserted to source Dataset.

 

if Suppose my Source dataset look following as(In future my source dataset look like the following format),

Screenshot_3.png

 

How to categorize the Fully client billable, Partially client billable, Fully internally billable, Partially internally billable, Non-billable

 

Note: take the target hour as per week 40

 

 

Anonymous
Not applicable

Hi @Anonymous 

You may use DAX to create the unpivot table.Then use the workaround as above.Check Table 2 in sample file.

Table 2 = 
UNION (
    SELECTCOLUMNS (
        'Data',
        "Date", 'Data'[Date],
        "Name", 'Data'[Employee name],
        "Internal Product billable", 'Data'[Internal Product billable],
        "Attribute", 'Data'[Column],
        "Value", 'Data'[Client billable]
    ),
    SELECTCOLUMNS (
        'Data',
        "Date", 'Data'[Date],
        "Name", 'Data'[Employee name],
        "Internal Product billable", 'Data'[Internal Product billable],
        "Attribute", 'Data'[Column 2],
        "Value", 'Data'[Utilization hours(non Billable)]
    )
)

Regards,

Community Support Team _ Cherie Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

Hi @

 

because My requirement is,

 

 

 

 

 

Thanks in advance

Yuvaraj.

Hi @Anonymous 

I would suggest you create a new thread on forum so that more community members can see it and provide advice. Please remember to post dummy data and desired result.

Regards,

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

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.