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.
Hello guys, I'm really confused because I want to do this...
I have a table with this style
What I need is to Count how many times in a row the words "OutSite(MTY)" or "Rest Day" repeats.
Im looking to achieve this with the following formula
Absences = CALCULATE( COUNTROWS('dbpenrh emergencypaymentroll'), SEARCH("OutSite(MTY)",'dbpenrh emergencypaymentroll',1,0))
The problem is that the SEARCH function doesn't "search" in all the table but needs at least 1 column...
Absences = CALCULATE( COUNTROWS('dbpenrh emergencypaymentroll'), SEARCH("OutSite(MTY)",'dbpenrh emergencypaymentroll'[Day_1],1,0))
Thats different from what I need.
I need something like a range for the SEARCH that goes from Day_1 to Day_30...
How can I do this? Is really giving me a bad time ....
Any help is so much appreciated
Solved! Go to Solution.
Hi,
In the Query Editor, select all columns other than the Day columns > Right click > Unpivot other columns. Drag Value column to the row labels. Write this measure
=COUNTROWS(Data)
Hope this helps.
Hi,
In the Query Editor, select all columns other than the Day columns > Right click > Unpivot other columns. Drag Value column to the row labels. Write this measure
=COUNTROWS(Data)
Hope this helps.
Am not sure if this helps.
https://community.powerbi.com/t5/Desktop/Count-based-on-another-column/td-p/422765
it's a different situation, what I'm trying to do is
count emergencypaymentroll [Day_1],emergencypaymentroll [Day_2],emergencypaymentroll [Day_3] ..... emergencypaymentroll [Day_30] when = "OutSite(MTY)"
To get something like this, I think that I need One Measure per Search, but the first thing I need to solve is the search trought all the columns in the table.
OutSite(MTY) || 3 Rest Day || 2 Abscence || 1
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 |
---|---|
109 | |
95 | |
77 | |
65 | |
53 |
User | Count |
---|---|
144 | |
105 | |
102 | |
89 | |
63 |