Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
i created a measure that calculates number of orders per customer.
i wish to use it as a slicer, so i can choose for example "30", and i will get in the near table - a list of the customers that have 30 orders.
important to mention that number of orders is a limited range of values (0-51)
how can i do that?
thanks in advance,
Amit
Hello @akfir
have you been able to solve the problem with the replies given?
If so, please mark it as solution (to help other users find useful content and to acknowledge the work of users that helped you)
Kudoes are nice too
All the best
Jimmy
Hello @akfir
a measure returns always a scalar value using the filter context.
To accomplish your need, don't add a measure, but a new column to your customer table and filter this new column with an slicer.
Hope this helps
Jimmy
Create A dummy table means table which is not in relationship with any other table.
orders_tab=generateseries(0,51)
Then create measure on your previous orders measure.
Filter=if(orders=selectedvalue(orders_tab[column]),1,0)
then add it to visual level filter and set it to 1.
Else simply you can create calculated column and add it into slicer.
Or provide self servie by adding measure into visual level filter and user can filter that measure from by his choice.
Thanks & regards,
Pravin Wattamwar.
https://www.linkedin.com/in/pravin-p-wattamwar/
If I resolve your problem mark it as solution and give kudos.
Thanks for your reply.
i have created this dummy table, but yet misunderstood the next step of connecting my 0-51 values column to the original measure of orders.
just to clarify myself - my goal is to have a slicer so i can use a "greater than or equal to" measure of the 0-51 values, for example if i pick greater than 40, then i will get the list of customers which have more than 40 orders.
Hello @akfir
I've never talked about a dummy table.
Just use your customer-table and add a custom columns with a formula like this COUNTROWS(RELATEDTABLE(yoursalesordertable))
This will add a the number of rows in the sales order table for every customer. For this new row you add a slicer in your visual and everything should be fine
Hope this helps
Jimmy
it is not the right solution because my customer table has a lot than one row per customer (dates etc.)
thats why countrows does not fit in this case.
Hello @akfir
so you have no relationship between customer and sales order I suppose. Due to multiple values in both tables.
then create a new table like this on, to create a distinct value for your customer
CustomerDistinct =
SUMMARIZE(
Customer;
Customer[Customer]
)
Connect this new table to your sales and customer table and add a new column like this
CountSales = COUNTROWS(RELATEDTABLE(Sales))
If this post helps or solves your problem, please mark it as solution (to help other users find useful content and to acknowledge the work of users that helped you)
Kudoes are nice too
Have fun
Jimmy
Thanks again for your quick reply.
i have only one data table in my model - containing customers and their orders as well, by month. each order has several products.
what is PRICE in your model?
instead of measure 2 put your measure which you have calculated as count of orders.
Thanks & regards,
Pravin Wattamwar
www.linkedin.com/in/pravin-p-wattamwar
If I resolve your problem Mark it as a solution and give kudos.
still does not work.
let me share with you my measures (which work fine til now):
can you share your PBIX?
sorry i cant. it has a sensetive data.
but i think what i shared with you suppose to be enough.
as i mentioned before, my rough data contains customers with all their products they purchased on monthly basis.
for example customer x bought 10 of product A on December and 20 of product B on January - each one is a row.
hope it helped...
whatever solution i have provided is working fine.
In our project most of time we followed this technic only.
the error you got "out of resources" something.
I think may be there is column which is summerizing.
Can you check all integer columns are set to "Don't summerize"?
all set as dont summarize.
Hello @akfir
just check out my solution. It applys two summarized tables, connectes them and adds a new column to count the sales order.
If this post helps or solves your problem, please mark it as solution (to help other users find useful content and to acknowledge the work of users that helped you)
Kudoes are nice too
Have fun
Jimmy
what about time data in your model?
i appreciate your help!
Hello @akfir
I've know included a date into my solution. But this date can be included in different way in you filters. Check it out.
If this post helps or solves your problem, please mark it as solution (to help other users find useful content and to acknowledge the work of users that helped you)
Kudoes are nice too
Have fun
Jimmy
Hello @akfir
then create a summarized table with only customer and another one with customer and sales order number, connect them all and apply the new column as described
Jimmy
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
18 | |
15 | |
11 | |
11 | |
8 |
User | Count |
---|---|
24 | |
18 | |
12 | |
11 | |
10 |