Forum Discussion
AishwariyaV
7 years agoHelper IV
X axis as range
hi,
In my report,
I need x axis to be in range format. i.e; i need to show the products which price ranging between <50, 51-60, 61-70, ......., >120
And this range should dynamically change. If i want to start with price 21 then x axis should start from <20, 21-30, 31-40 , ......, > 100( i,e; The price value should be user's choice )
The increment option should also change. If i want to start with 21 and increment by 5, then my x axis should be 21-25, 26-30, 31-35, ......., > 100( i,e; The increment value should be user's choice )
2 Replies
- v-chuncz-msftCommunity Support
- AishwariyaVHelper IV
I have used a DAX formula and it works fine. But it gets more complicated when there are more data. Is it possible to do it using loop ??
This is the DAX I have used,
1 =IF(AND(SUM(Products[UnitPrice])>0 , SUM(Products[UnitPrice]) < 'Starting with'[Starting with Value]),CONCATENATE("<",'Starting with'[Starting with Value]),IF(AND(SUM(Products[UnitPrice])>'Starting with'[Starting with Value],SUM(Products[UnitPrice])<='Starting with'[Starting with Value]+'Inc By'[Inc By Value]),CONCATENATE('Starting with'[Starting with Value]+1 ,CONCATENATE(" - ",'Starting with'[Starting with Value]+'Inc By'[Inc By Value])),IF(AND(SUM(Products[UnitPrice]) > 'Starting with'[Starting with Value]+'Inc By'[Inc By Value] , SUM(Products[UnitPrice]) <= 'Starting with'[Starting with Value]+'Inc By'[Inc By Value]+'Inc By'[Inc By Value]),CONCATENATE('Starting with'[Starting with Value]+'Inc By'[Inc By Value]+1 ,CONCATENATE(" - ",'Starting with'[Starting with Value]+'Inc By'[Inc By Value]+'Inc By'[Inc By Value])))))I need this DAX in loop.