Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Hello Power BI Community Members,
I have a requirement where I can use only the Power BI DAX. In Power BI Desktop, I have a table named as Marksheet. This table has below columns as:
As per my requirement, I have to filter only the Title column using Measure. You can see the below screenshot:
As the above screenshot, I want to filter the title column using Measure formula (Not by using Slicer Filter, For your understanding purpose, I have taken Slicer filter). As my requirement, I want to view the mark sheet of each person. Let me clear you.
Here, I want to only view the mark sheet of Preeti and after that, in the Clustered Bar Chart, it will show me all the marks of Preeti only.
As I am new to Power BI DAX, I don't have much knowledge about this. Can anyone suggest to me what I have to do in this case?
Also, You can see my sample report by clicking below link:
Solved! Go to Solution.
KevinProjectedMTDSales = CALCULATE(SUM('Report for Sales'[Projected MTD Sales_]),'Report for Sales'[Title]="KEVIN")
KevinCurrentMonthBudget = CALCULATE(SUM('Report for Sales'[Current Month Budget]),'Report for Sales'[Title]="KEVIN")
Per your requirement to do it in DAX, you should probably do something along the lines of:
Measure =
VAR __table = FILTER('Table',[Title] = "Preeti")
RETURN
SUMX(__table,[Marks])
Hi @Greg_Deckler ,
Thanks for your reply!!
And one more thing I want to know is If I will take a text column (Basically String) instead of [Marks], then What should I use the function instead of SUMX?
Because when I am trying to enter a text column instead of marks, it is showing me an error as:
"The Function SUMX can not work with values of type String".
Please, can you suggest me what I have to do?
If you are returning a string, you would want to use something like MAXX or MINX instead of SUMX.
Hi @Greg_Deckler ,
I have another table named Report for Sales where I have to do the same requirement as the Marksheet table. In this Report for Sales table, I have to filter each person's details from the Title column. You can see the below screenshot.
Here, In this above screenshot, I have taken a slicer filter for your understanding purpose. As per my requirement, I want to show each person details. For example, When I will select "KEVIN", it will display only the details of KEVIN only.
But I want to do this thing by using Measure not by using any Filter.
Also, I have used your Measure formula as you said, but it is not working for me. And one more thing I want to say is, I want to display the measure by using the Clustered bar chart like the above screenshot.
You can view my sample report by clicking this link: Sample Report
Please, Can you suggest me what I have to do?
KevinProjectedMTDSales = CALCULATE(SUM('Report for Sales'[Projected MTD Sales_]),'Report for Sales'[Title]="KEVIN")
KevinCurrentMonthBudget = CALCULATE(SUM('Report for Sales'[Current Month Budget]),'Report for Sales'[Title]="KEVIN")
how would you do multiple words? IE Kevin, Jerry, Anisha
User | Count |
---|---|
53 | |
28 | |
19 | |
18 | |
14 |
User | Count |
---|---|
92 | |
86 | |
39 | |
24 | |
22 |