Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

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.

Reply
JPBIToday
New Member

Filter Context: let Date columns filter, but keep all names in table?

Hello! I've been trying solutions for this for the past few hours, finally thought to just try here. I have a relatively simple dataset, just like the sample data below: 

 

Customer Name  Date  Purchases
John9/16/202214
Jacob9/16/20225
Jingleheimer9/16/20221
Schmitt9/19/20222
Jacob9/19/2022

1

 

I got a request from higher-ups to show the data in a simple table, Name in rows, Date in columns, sum Purchases in Values, and use the Relative Date filter (in the filter pane) to only show the next 12 months from 9/16/22 (today).

 

 Date    
Name9/169/199/259/269/31
John14 2 2
Jacob51 1 
Jingleheimer1    
Schmitt 2   

 

Here's the problem: if any Customers made a purchase outside that Date filter range, the customers just don't show up in the rows at left! ALL customers need to appear in the rows - even if there is no purchase data on that date for them. 

 

Of course, I did toggle the "Show items with no data" option, like in the screenshot below, but the customer names are still getting filtered out. 

JPBIToday_0-1663353151487.png

What should be done? I have tried using ALL() or REMOVEFILTERS() in measures, but frankly keep getting errors I don't understand. Thank you in advance, and all help is greatly appreciated!

1 ACCEPTED SOLUTION
PaulDBrown
Community Champion
Community Champion

Try using a measure along the lines of:

Purchases = SUM(Table[Purchases]) + 0

 

Or

Purchases =COALESCE ( SUM(Table[Purchases]), 0)





Did I answer your question? Mark my post as a solution!
In doing so, you are also helping me. Thank you!

Proud to be a Super User!
Paul on Linkedin.






View solution in original post

2 REPLIES 2
PaulDBrown
Community Champion
Community Champion

Try using a measure along the lines of:

Purchases = SUM(Table[Purchases]) + 0

 

Or

Purchases =COALESCE ( SUM(Table[Purchases]), 0)





Did I answer your question? Mark my post as a solution!
In doing so, you are also helping me. Thank you!

Proud to be a Super User!
Paul on Linkedin.






parry2k
Super User
Super User

@JPBIToday the best practice/solution woule be create another table for customer (dimension) and link with transaction table and then use customer name from customer table and select show items with no data

 

 

Follow us on LinkedIn and YouTube.gif to our YouTube channel

I would  Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make effort to give Kudos to whoever helped to solve your problem. It is a token of appreciation!

 

Visit us at https://perytus.com, your one-stop shop for Power BI-related projects/training/consultancy.

 



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.