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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Rkrama
Regular Visitor

Can Excel visuals be replicated in power bi dax

Hi 

1.can we get the excel visual same in power bi please find the image below 

2.also want to show total number of  assigned count(A) ,credential count(c),disabled count (D)from matrix 

Any help would be much appreciated 

thanks

IMG_2878.jpeg

2 REPLIES 2
Rkrama746
Frequent Visitor

Hi @Anonymous ,

This is the requiremnt i have and i wrote a measure to display the Status untill highligted

  1. In each cell...
    1. An 'A' will be displayed if the staffer is assigned to the contract
      1. In ContractStaff the Assigned column will have a 1
    2. An 'C' will be displayed if the staffer is only credentialed (has contractstaff record but not assigned or disabled)
      1. A ContractStaff record will exist but Assigned and disabled are BOTH 0's
    3. A 'D' will be displayed if the staffer has a contractstaff record but has a disabled state
      1. In ContractStaff the disabled column will have a 1 
  2. Subtotal rows: Bottom 5 rows will be frozen (always displayed) and contain...
    1. An 'Assigned Count' row
      1. Subtotal of each staffer's assigned count of contracts (displayed with filters applied)
    2. A 'Credentialed Count' row
      1. Subtotal of each staffer's credentialed count of contracts (displayed with filters applied)
    3. A 'Disabled Count' row
      1. Subtotal of each staffer's disabled count of contracts (displayed with filters applied)
    4. A 'Non-Credentialed, Valid License' row
    5. A 'Credentialed, Invalid License' row
  3. Subtotal Column on right
    1. For each row show subtotals for each contract of...
      1. Total assigned users
      2. Total credentialed users
      3. Total disabled users
  4. License Conditional Formatting/Highlighting
    1. For Non-Subtotal Rows...
      1. Highlight green if the respective user has the appropriate license for that contract
      2. Highlight yellow if the respective user lacks the appropriate license for that contract
      3. Highlight red if the respective user lacks the appropriate license for that contract and they have ANY ContractStaff record (regardless of assigned, disabled, credentialed).


Dax is have used is 

Status =
SWITCH (
    TRUE (),
    COUNTROWS(FILTER(ContractStaff, ContractStaff[Assigned] = TRUE())) > 0 && COUNTROWS(FILTER(ContractStaff, ContractStaff[Disabled] = FALSE())) > 0, "A",
    COUNTROWS(FILTER(ContractStaff, ContractStaff[Assigned] = FALSE())) > 0 && COUNTROWS(FILTER(ContractStaff, ContractStaff[Disabled] = FALSE())) > 0, "C",
    COUNTROWS(FILTER(ContractStaff, ContractStaff[Disabled] = TRUE())) > 0, "D",
    BLANK()
)



 

I need to display the count of total A,C,D in the same matrix regards to the Staffname your help will be much appricated.thanks

Anonymous
Not applicable

Hi  @Rkrama ,

 

Here are the steps you can follow:

1. Create calculated table.

Table 2 =
var _table1=
{"Assigned Count","Credentialed Count","Disable Count"}
var _table2=
DISTINCT('Table'[ConTracts])
RETURN
UNION(
    _table2,_table1)

vyangliumsft_0-1712032871734.png

2. Create measure.

Value =
var _column=SELECTCOLUMNS('Table',"1",'Table'[ConTracts])
return
SWITCH(
    TRUE(),
    MAX('Table 2'[ConTracts]) = "Assigned Count",
    COUNTX(
        FILTER(ALL('Table'),
        'Table'[Group]=MAX('Table'[Group])&&'Table'[Value]="A"),[Value]),
    MAX('Table 2'[ConTracts]) = "Credentialed Count",
    COUNTX(
        FILTER(ALL('Table'),
        'Table'[Group]=MAX('Table'[Group])&&'Table'[Value]="C"),[Value]),  
    MAX('Table 2'[ConTracts]) = "Disable Count",
    COUNTX(
        FILTER(ALL('Table'),
        'Table'[Group]=MAX('Table'[Group])&&'Table'[Value]="D"),[Value]),
    MAX('Table 2'[ConTracts]) in _column&& MAX('Table'[Value]) <> BLANK(),
MAXX(
    FILTER(ALL('Table'),
    'Table'[ConTracts]=MAX('Table 2'[ConTracts])&&'Table'[Group]=MAX('Table'[Group])),[Value])
,BLANK())
Color =
IF(
    ISERROR(VALUE([Value])) && [Value]<>BLANK(),"green",
    IF(
        ISERROR(VALUE([Value])),"yellow"))

3. [Value] – Conditional formatting – Background color.

vyangliumsft_1-1712032871736.png

vyangliumsft_2-1712032934435.png

4. Result:

vyangliumsft_3-1712032944392.png

 

Best Regards,

Liu Yang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.