Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
Hello Folks,
Please find the pbix file in the link given below
https://www.dropbox.com/s/j4y305smqj8geji/Sample_File.pbix?dl=0
I need your urgent help for the given scenario.
I have a table visual in powerBI where all the values reflect if there are values found in count_record and count_transaction measure as given below:
User | Client | Appliance | Count_Record | Count_Transaction |
John smith | Orange | Sony | 1000 | 1000 |
John Smith | Orange | Microsoft | 1400 | 1300 |
John Smith | Orange | Panasonic | 2000 | 0 |
Paul Logan | Orange | Samsung | 1500 | 1500 |
Paul Logan | Orange | Sony | 1800 | 1800 |
David Clarke | Kite | LG | 0 | 2000 |
David Clarke | Kite | Microsoft | 2500 | 2500 |
But as soon as I change the date or the appliance values from the slicer, the whole table goes blank because there is no value found.
What I want is something like this, if there is no data found for these 2 measure, this is how the table should look. all the values should be there with 0 in count_record and count_transaction. The values should only change when I change the client from the client slicer or Appliance slicer. For Example: If we select orange from the client slicer then I should get all the users in the rows along with only those appliances that they have used in the past with 0 values in count_record and count_transaction, if no data is found.
User_Name | Client | Appliance | Count_Record | Count_Transaction |
John smith | Orange | Sony | 0 | 0 |
John Smith | Orange | Microsoft | 0 | 0 |
John Smith | Orange | Panasonic | 0 | 0 |
Paul Logan | Orange | Samsung | 0 | 0 |
Paul Logan | Orange | Sony | 0 | 0 |
I tried these measure but that didn't work
Final_Count_Record = IF(ISBLANK(Count_Record),0,(Count_Record))
Final_Count_Transaction = IF(ISBLANK(Count_Transaction),0,(Count_Transaction))
Solved! Go to Solution.
@Anonymous A few notes for you:
1) You don't need the inactive relationship between Client and Transaction/Record tables.
2) Use a DateKey for your date relationships (one is text and one is date, so that's not currently working): https://excelwithallison.blogspot.com/2020/04/dimdate-what-why-and-how.html
3) Clear the date filter in your measure and use that to decide whether to add 0 to the Record/Transaction Count. Here is the formula for Record count:
Copying DAX from this post? Click here for a hack to quickly replace it with your own table names
Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C
I work as a Microsoft trainer and consultant, specialising in Power BI and Power Query.
www.excelwithallison.com
Hello @AllisonKennedy
This logic actually worked for me. Exactly what I needed.
Highly Appreciated and Thankful for explaining the logic on pbix file.
Best Regards,
Ashish Oza
@Anonymous A few notes for you:
1) You don't need the inactive relationship between Client and Transaction/Record tables.
2) Use a DateKey for your date relationships (one is text and one is date, so that's not currently working): https://excelwithallison.blogspot.com/2020/04/dimdate-what-why-and-how.html
3) Clear the date filter in your measure and use that to decide whether to add 0 to the Record/Transaction Count. Here is the formula for Record count:
Copying DAX from this post? Click here for a hack to quickly replace it with your own table names
Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C
I work as a Microsoft trainer and consultant, specialising in Power BI and Power Query.
www.excelwithallison.com
User | Count |
---|---|
97 | |
73 | |
69 | |
43 | |
23 |