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.
I have Products as well Date Table.I want to find out Best Selling Days out of it. For this I have Calculated "Average Sales Per Day"
Solved! Go to Solution.
Hi @sanju24 ,
I created a sample pbix file(see the attachment), please check if that is what you want.
1. Create a measure as below
Flag =
VAR _seldate =
SELECTEDVALUE ( 'Calendar Table'[Date] )
VAR _tab =
SUMMARIZE (
ALLSELECTED ( 'Calendar Table' ),
'Calendar Table'[Date],
"@avgsale", [Averagesalessperday]
)
VAR _tab2 =
ADDCOLUMNS ( _tab, "@rank", RANKX ( _tab, [@avgsale],, DESC, DENSE ) )
VAR _rank =
MAXX ( FILTER ( _tab2, [Date] = _seldate ), [@rank] )
RETURN
IF ( _rank <= 5, 1, 0 )
2. Create a visual and apply the visual-level filter on the visual with the condition(Flag is 1)
If the above one can't help you, please provide some raw data in your table (exclude sensitive data) with Text format, your visual Fields settings and your expected result with backend logic and special examples? It would be helpful to find out the solution. You can refer the following links to share the required info:
How to provide sample data in the Power BI Forum
How to Get Your Question Answered Quickly
And It is better if you can share a simplified pbix file. You can refer the following link to upload the file to the community. Thank you.
How to upload PBI in Community
Best Regards
Thank You it worked.
Hi @sanju24 ,
I created a sample pbix file(see the attachment), please check if that is what you want.
1. Create a measure as below
Flag =
VAR _seldate =
SELECTEDVALUE ( 'Calendar Table'[Date] )
VAR _tab =
SUMMARIZE (
ALLSELECTED ( 'Calendar Table' ),
'Calendar Table'[Date],
"@avgsale", [Averagesalessperday]
)
VAR _tab2 =
ADDCOLUMNS ( _tab, "@rank", RANKX ( _tab, [@avgsale],, DESC, DENSE ) )
VAR _rank =
MAXX ( FILTER ( _tab2, [Date] = _seldate ), [@rank] )
RETURN
IF ( _rank <= 5, 1, 0 )
2. Create a visual and apply the visual-level filter on the visual with the condition(Flag is 1)
If the above one can't help you, please provide some raw data in your table (exclude sensitive data) with Text format, your visual Fields settings and your expected result with backend logic and special examples? It would be helpful to find out the solution. You can refer the following links to share the required info:
How to provide sample data in the Power BI Forum
How to Get Your Question Answered Quickly
And It is better if you can share a simplified pbix file. You can refer the following link to upload the file to the community. Thank you.
How to upload PBI in Community
Best Regards
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
105 | |
101 | |
79 | |
72 | |
64 |
User | Count |
---|---|
142 | |
108 | |
101 | |
81 | |
74 |