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
Anonymous
Not applicable

Required help to create Price band in Sales Table based on selected currency in dashboard.

Hi, 

 

Currently I am working on Retail dataset which deals with multiple stores, sales etc. I have a requirement to create price band column in my table and use it as visual. 

Ex- My Sales table consist of 10 products and sales to it, then we need to create price band column next to it to define between which range exactly each product is. 

To get price band column, i have created one table & 2 measures. 

1. Price band step value Table - 

GENERATESERIES(10, 1000, 10)
2. Price Unit measure  - Sales amount/ Sales Quantity 
3. Price band fix = IF(MOD([Price Unit],'Price band step'[Price band step Value])==0,[Price Unit]+1,[Price Unit])
Last I created Price range calculated column - 
CONCATENATE(FORMAT(ROUNDUP( [Price band fix]/ 'Price band step'[Price band step Value],0),"00 : "), CONCATENATE(CONCATENATE(ROUNDDOWN( [Price band fix]/ 'Price band step'[Price band step Value],0)*'Price band step'[Price band step Value]," - "),ROUNDUP( [Price band fix]/ 'Price band step'[Price band step Value],0)*'Price band step'[Price band step Value]))
 
Now I need this price range calculated column to change based on currency selection in my report. If end user selects USD, price range for all the countries product shoudl display price range in USD. 
Any suggestion how to achieve that? 
Using currency Table - 
Hkrishna_1234_0-1653026486291.png

Sales Table - 

Hkrishna_1234_1-1653027571321.png

Whatever price range in current table is in country local currency, that means thailand sales, price everything is in Thailand local currency - THB, same applies to Vietnam its in VND. Now my requirement is to make that price band change to watever currency we select in report. If we select THB, all the country product sales, price & price range should change to THB. 

 

Could anyone suggest some solution for this? 

 

 

 

2 REPLIES 2
v-zhangti
Community Support
Community Support

Hi, @Anonymous 

 

I'm having trouble with the Price band fix measure when restoring your data.

vzhangti_0-1653372136282.png

vzhangti_1-1653372214489.png

Please help to correct this formula.

vzhangti_2-1653372366943.png

 

Can you provide some sample data or simple pbix files? Sensitive information can be removed in advance.

 

Best Regards,

Community Support Team _Charlotte

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Anonymous
Not applicable

Hi v-zhangti,

 

Thanks for your response. 

 

Date Country Store id Product Code Sales net Sales unit Price Price Band 
30-12-2021Thailand 5432ET11HF25002125013:1200-1300
01-02-2021Thailand 7654FR23FUI30001300030:2900-3000
03-02-2021Thailand 5673ER43GJF1500350005:400-500
05-06-2021Thailand 6574TYF345246481464847:4600-4700
21-11-2021Thailand 9873GR5647535841339.514:1300-1400
16-05-2021Thailand 7875FD14536857924289.543:4200-4300
17-07-2021Thailand 8289HFG785861342153.2522:2100-2200
14-11-2021Thailand 3648HIH983273542367737:3600-3700
01-10-2021Thailand 3647BGS7657645341613.2517:1600-1700
11-11-2021Thailand 4324JDF427287002435044:4300-4400
30-11-2021Thailand 5798KRD7598531741329.25

14:1300-1400

 

I have shared sample sales data with just 10 rows. Based on the price band fix measure, I can get Price range column which defines range for each product. 

Price band step Value = SELECTEDVALUE('Price band step'[Price band step],100)
 
First,I have created Price band step value measure and then used in price band fix measure.
Price band fix = IF(MOD([Price Unit],'Price band step'[Price band step Value])==0,[Price Unit]+1,[Price Unit])
Expected output is price range column should change according to the currency selection in my dashboard.
As of now, My sales, Price measures are changing according to currency selection, but price range remains same even though if i select any other currency. 
 
 
Regards, 
Hkrishna_1234. 

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.