Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hello,
What I am looking for is filter a week and check which machines were repaired and how many times these were repaired in all the registers in the table.
I know how to do it setting filters in the visualizations but I am sure that mixing some DAX expressions is possible to do it in an easier and correct way. I was not able to get this combo 😞
I prepared an example to simplify it. In the example, we can see which would be the solution for each week filtered.
The solution should filter the machines in the week selected but, without filter if they appear in another week to be able to accumulate the times these were repaired.
This is for a bar chart.
Thank you very much in advance!
Hello @tamerj1 and @amitchandak and thank you for quick answer.
Logic:
I am trying to obtain some details of the electrical trips in different machines (to simplify it, I said machines).
The details I am looking for are, during the last week:
- how many trips there were (a simple count)
- how may we have accumulated (simple count + "removefilters" for weeks)
- and the last one that I am asking for is to prepare a plot with all the trips registered BUT only for the machines we had a trip during last week.
It is for this reason I do not want to see the accumulate of all machines but, only for those that had a trip during last week.
The solution of @tamerj1 works great! is almost perfect but has a small issue. I cannot use the dimensions. I have to use the fields which are in the fact table. I would prefer to use the filter of the week from the week dimension.
Thank you again in advance!
Hi @jmateu88
You can try
Count = COUNTROWS ( CALCULATETABLE ( Fact, ALLEXCEPT ( Fact, Fact[Machine] ) ) )
User | Count |
---|---|
25 | |
12 | |
8 | |
6 | |
6 |
User | Count |
---|---|
26 | |
12 | |
11 | |
9 | |
6 |