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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Anonymous
Not applicable

Producing a line graph with countifs

Hello all, 

 

I'm relatively new to PowerBI, so i'm not really used to the DAX syntax yet, which is the reason i'm posting this question. 

 

Normally i make reports based on excel-made graphs. I am currently trying to reproduce a report in Powerbi. Most charts are working fine, but i have one graph i cannot seem to make. 

 

The problem:

I want to make a line graph with values based on multiple filters. An example of said line graph in excel.

test1.PNG

The graph is based on a summary made out of a set of data consisting out of three columns:

columns(values)

  1. Weekday (monday,tuesday,wednesday,thursday,friday)
  2. type(Variable A, Variable B, Variable C)
  3. Status(In use, Temporarily not in use, Not in use)

From this set of data i produced the following table:

 

                         Monday       Tuesday    Wednesday   Thursday   Friday

Variable A          45%                50%              41%            46%         38%
Variable B          36%                38%              27%            35%         20%
Variable C          13%                39%              23%            34%         %13

 

The formula i used to produce the summary above is:
used variables for example("Monday", "Variable A", "In use") 

=COUNTIFS(Data[Weekday];"Monday"
                    ;Data[Type];"Variable A"
                    ;Data[Status];"In use")

 /
  COUNTIFS(Data[Weekday]"Monday"
                    ;Data[Type];"Variable A")

 

From the summary i made the graph. I tried several things in powerbi, but i cannot seem to make it work. Can anyone explain to me how to produce the same graph in Powerbi?
Best Regards,

Pim Schoeman

 

 

1 REPLY 1
v-evelk
Employee
Employee

Hello Pim Schoeman,

 

DAX is out of our expertise because it is a feature of Desktop so, it is more efficient to ask all the questions regarding DAX in the Desktop thread.

 

Kind Regards,

 

Evgenii Elkin,
Software Engineer
Microsoft Power BI Custom Visuals
pbicvsupport@microsoft.com

Helpful resources

Announcements
PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

Top Solution Authors