Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code FABINSIDER for a $400 discount.
Register nowGet inspired! Check out the entries from the Power BI DataViz World Championships preliminary rounds and give kudos to your favorites. View the vizzies.
I have 2 tables. One is risks. It has RiskId and ServiceId. Another table is RiskId and JobId, the RiskId can occur multiple times in table2. I want to use ServiceId as slicer and display the RiskId and the count of occurence in table 2.
Solved! Go to Solution.
Hi @liyucao,
I'm attaching a pbix file with the my solution.
The final result should be this:
Proud to be a Super User!
Hi @liyucao,
I'm assuming that your measure is compute the right numbers when the RiskID exists in table 2. Take this in mind, to shows 0 when RiskID it's not exist in table 2 I only adjust the return to this:
var _sum = CALCULATE(
COUNTROWS(table_2)
)
RETURN
IF(
ISBLANK(_sum),
0,
_sum
)
Proud to be a Super User!
If so, the slicer will not take affect, it will show all risks
If you can provide a simple pbix or pictures of what you have now and the desired output,I could be more helpful.
Proud to be a Super User!
for example, I want to show the list of risks and count the linked experiment in a time period and show it. Actually there are 8 risks in the service I select, since 3 of 8 have no experiment so it does not show in the table.
But if I add the if condition here. The slicer does not take affect and the table shows all risks. It is very wierd.
On the return, replace 0 to BLANK() and see what happens.
Proud to be a Super User!
how to make the table contains 8 risks (of the service in the slicer) and show 0 if there is no existing experiment
Without analysing your file, I can't help you further. If you can share a sample pbix file with your example I will take a look otherwise it's a waste of time for both of us.
Proud to be a Super User!
https://microsoftapc-my.sharepoint.com/:u:/g/personal/liyucao_microsoft_com/EVc0bLO3RQlAvSdTnB6rYoIB... can you view it?
As expected, the table should show all risks in serviceId A, which is 1,3,4. But the 2 method I try does not show correctly.
Hi @liyucao,
I'm attaching a pbix file with the my solution.
The final result should be this:
Proud to be a Super User!
Thanks, it really helps. I am trying to understand the measure.
It will still show the 5 risks that exists in experiment table.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code FABINSIDER for a $400 discount!
Check out the February 2025 Power BI update to learn about new features.
User | Count |
---|---|
118 | |
116 | |
71 | |
64 | |
46 |