Forum Discussion
Power bi
I need to know how to calculate the sales category on general customers
For example how many sales completed from the range of $1 to 50 and $50 to $100
Please help me to do this using power bi
Thanks
13 Replies
- JpssResolver II
Fahim78666 ,
you need to create a calculated column with the bucket / range that you need to count
that will help you get a count of rows per range.
Please see this file :Fahim78666 _ jpssSol.pbix
If you find this helpful, Consider marking this as a solution. - Fahim78666Regular Visitor
i have 3 tables name
Translines, Transheader and transpayment
how can i use this 3 table to find the stated above
- JpssResolver II
Please share a pbx file with sample dataset and expected outcome
- Fahim78666Regular Visitor
I just have a BAK file
Can you please login through remote Access and check
- Fahim78666Regular Visitor
Can you please explain me how database relationships works
how to know on how to create relationship
- AnonymousNot applicable
Hi Fahim78666
Based on your needs, I have created the following table.
First of all, you need to categorize the sales of different customers
category = IF(SELECTEDVALUE('Table'[sales])>=1 && SELECTEDVALUE('Table'[sales])<50, "$1 to 50" , IF(SELECTEDVALUE('Table'[sales])>=50 && SELECTEDVALUE('Table'[sales])<=100, "$50 to $100", BLANK()))Then count the different sales categories.
count = VAR _category = [category] VAR _count = CALCULATE(COUNTROWS('Table'),FILTER(ALL('Table'),'Table'[category]=_category)) RETURN _countBest Regards,
Jayleny
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- Ashish_MathurSuper User
Hi,
I have solved a similar question in the attached PBI file.
Hope this helps.
- Fahim78666Regular Visitor
Can you please explain me how database relationships works
how to know on how to create relationship
- AnonymousNot applicable
Hi Fahim78666
Please refer to the following document:
Model relationships in Power BI Desktop - Power BI | Microsoft LearnBest Regards,
Jayleny
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- Fahim78666Regular Visitor
why im getting every values same