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.
Hi, I have the data of Employees and their Credit Card spends. The data contains Employees having multiple spends in the same month.
Sample of the dataset is provided below,
Date | Emp_ID | Emp_Name | Emp_Department | Amount_Spent | Place | ||
9/16/2023 | 94 | Kimberly Chan | Sales | 214.57 | Hinton-Gomez | ||
9/16/2023 | 95 | Andrew Miller | Sales | 77.19 | Avery-Macdonald | ||
9/16/2023 | 96 | David Johnson | IT | 381.46 | Long-Gonzales | ||
11/26/2023 | 96 | David Johnson | IT | 323.46 | Williams, Ball and Marshall | ||
9/16/2023 | 97 | Jimmy Cain | Operations | 483.69 | King and Sons | ||
10/9/2023 | 97 | Jimmy Cain | Operations | 474.37 | Jones, Richards and Montoya | ||
10/18/2023 | 97 | Jimmy Cain | Operations | 61.49 | Weaver-Stephens | ||
11/25/2023 | 97 | Jimmy Cain | Operations | 481.56 | Serrano, Cochran and Tanner | ||
12/11/2023 | 97 | Jimmy Cain | Operations | 270.03 | Hunter, Kirby and Potter | ||
9/16/2023 | 98 | George Travis | Operations | 21.63 | Andrade, Collier and Davenport | ||
10/6/2023 | 98 | George Travis | Operations | 135.93 | Stone, Wilkins and Wells | ||
10/29/2023 | 98 | George Travis | Operations | 56.76 | Miller Ltd | ||
11/1/2023 | 98 | George Travis | Operations | 181.11 | Johnson PLC | ||
12/9/2023 | 98 | George Travis | Operations | 497.66 | Chavez, Green and Ochoa | ||
12/12/2023 | 98 | George Travis | Operations | 302.66 | Hernandez-Lindsey | ||
9/16/2023 | 99 | Daniel Hebert | Marketing | 22.83 | Young, Gonzalez and Bradshaw | ||
10/5/2023 | 99 | Daniel Hebert | Marketing | 78.29 | Morgan-Roth | ||
11/9/2023 | 99 | Daniel Hebert | Marketing | 244.62 | Montoya-Garrison | ||
11/25/2023 | 99 | Daniel Hebert | Marketing | 375.58 | Carter, Chen and Zuniga | ||
12/4/2023 | 99 | Daniel Hebert | Marketing | 87.21 | Brown-Navarro | ||
9/16/2023 | 100 | Jennifer Thompson | Sales | 459.3 | Jones Ltd | ||
10/12/2023 | 100 | Jennifer Thompson | Sales | 238.13 | Webb, Mcdaniel and Williamson | ||
11/4/2023 | 100 | Jennifer Thompson | Sales | 132.01 | Miller LLC | ||
11/25/2023 | 100 | Jennifer Thompson | Sales | 402.75 | Rodriguez and Sons | ||
11/28/2023 | 100 | Jennifer Thompson | Sales | 98.49 | Thomas-Moore | ||
9/16/2023 | 101 | Diana Smith | Sales | 86.24 | Rogers-Winters | ||
10/15/2023 | 101 | Diana Smith | Sales | 253.28 | Hogan Group | ||
11/6/2023 | 101 | Diana Smith | Sales | 300.5 | Graham, Monroe and Bennett | ||
12/14/2023 | 101 | Diana Smith | Sales | 208.65 | Tucker, Hogan and Hernandez | ||
12/14/2023 | 101 | Diana Smith | Sales | 319.32 | Hogan-Hooper | ||
9/16/2023 | 102 | Cassidy White DVM | Finance | 397.39 | Graham Inc | ||
9/18/2023 | 102 | Cassidy White DVM | Finance | 140.54 | Williams-Woods | ||
10/13/2023 | 102 | Cassidy White DVM | Finance | 140.57 | Weaver PLC | ||
12/4/2023 | 102 | Cassidy White DVM | Finance | 32.41 | Oneill and Sons |
My requirement is to analyzie people who have used the Credit Card more than one time.
I created a What-If parameter "Credit Card Used Filter" as a decimal number from 1 to 4 and added it as a slicer. I further used it in my measures so that the slicer works properly when used.
This is how my report looks at the moment,
However, what I am trying to do is basically create a Bar Graph that will show "Credit Card Used" in the X-Axis (that is, 1, 2, 3 etc.)
and then show a bar containing the number of employees that fall in those categories. For example, 4000 people used Credit Card only once, 200 used it 2 times, 50 people used it 3 times, 4 people used it 4 times and maybe one more thing that we can add is -> 3 people used it 4+ times.
So what I need in my X-Axis is: 1, 2, 3, 4, 4+
What I need in my Y-Axis is: Total Employees falling in that category for the given set of filters (Year, Month, Department etc.)
Anyone here who can help in achieving this? Thanks.
Solved! Go to Solution.
Like this?
You may also want to take it easy on the What-If parameters. They include a measure for a reason.
see attached.
@lbendlin Exactly like this! Thank you so much!
How would you do it with the help of measure, by the way? Would love to know if you have a bit of time, would appreciate that.
I would always do it with the measure rather than What-If Parameter because measures are easier to handle but I don't think this is achievable through a measure (because you can't place a Measure on the X-Axis?)
And also, you can't really have a measure as a slicer
Like in my proposal you have to prepare a static table with all possible measure values. Then you can use that for the x axis etc.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
46 | |
28 | |
22 | |
12 | |
8 |
User | Count |
---|---|
75 | |
53 | |
46 | |
15 | |
12 |