Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.

Reply
sd22
Frequent Visitor

Hi All,

I have a column named pp having numeric values 0 till 12. This pp column is acting as a slicer. Now I want to create the dynamic column let's say if I selected 5 from pp slicer then dynamic column should contain values 0,1,2,3,4,5. Basically the dynamic column will contain values from 0 till the selected value .

 

 

Thnaks & Regards

sd22

1 ACCEPTED SOLUTION
FreemanZ
Super User
Super User

hi @sd22 

it hides some complexity,

1) supposing you have a Table1 like:

FreemanZ_0-1677679817414.png

 

2) try to create another table2 with pp2 column, exactly the same value, but do not relate them. 

FreemanZ_1-1677679891263.png

 

3) write a measure like:

 

measure = 
VAR _value2 = SELECTEDVALUE(Table2[pp2])
VAR _value1 = MAX(Table1[pp])
RETURN
IF( _value1<=_value2, 1, 0)

 

 

4) plot a slicer with table2[PP] and a table visual with table1[PP]. Choose not summarize for the table visual. Feed the measure to the filter pane of the table visual and choose 1. it worked like:

FreemanZ_2-1677680103320.png

FreemanZ_3-1677680115276.png

 

 

View solution in original post

7 REPLIES 7
sd22
Frequent Visitor

Hi FreemanZ / andhiii079845 ,

 

Thankyou for your swift response.

 

My actual requirement is like . Here is my data set : 

 

sd22_1-1677759826043.png

 


Now I wan to create two table visuals like For the Current Month & Running Total. On top of it I have two slicers FY & Posting Period.

 

sd22_2-1677759918136.png

My requirement is If I select 2021 FY and Posting Period 004 then in Current Month Table I should show sales according to FY =2021 && Posting Period = 004.
For Running Total Table I should see the data where Fy =2021 but Posting Period should show cummulative data of sales from Posting Period = 0+ Posting Period = 1+ Posting Period = 2+ Posting Period = 3+ Posting Period = 4.

Basically In running Total table I should see the cumulative data based on the slicer selection of posting period. If I have selected Posting Period as 002 then In running total table I should be able to see total sales for fy 2021 where posting period = 0,1,2.

Thanks & Regards

sd22

 

This is a completey new question right? -> perhaps a new topic? 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Hi andhiii079845,

Yes this can be considered as a new query because I thought creating dynamic calculated column
will work but as no relation is there . It is not working.
This can be treated as a new question. Kindly help me with this.

Thanks & Regards


Sd22
 
 

Are you able to upload the .pbix with sample data? So I do not have to copy it for my own.





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




FreemanZ
Super User
Super User

hi @sd22 

it hides some complexity,

1) supposing you have a Table1 like:

FreemanZ_0-1677679817414.png

 

2) try to create another table2 with pp2 column, exactly the same value, but do not relate them. 

FreemanZ_1-1677679891263.png

 

3) write a measure like:

 

measure = 
VAR _value2 = SELECTEDVALUE(Table2[pp2])
VAR _value1 = MAX(Table1[pp])
RETURN
IF( _value1<=_value2, 1, 0)

 

 

4) plot a slicer with table2[PP] and a table visual with table1[PP]. Choose not summarize for the table visual. Feed the measure to the filter pane of the table visual and choose 1. it worked like:

FreemanZ_2-1677680103320.png

FreemanZ_3-1677680115276.png

 

 

Nice a very simlar way to solve it 🙂





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




andhiii079845
Solution Sage
Solution Sage

Hi,

i create a second table "slicer" with the pp values and use it in the slicer. I create a measure with following code

 

Measure = 
VAR _selectvalue = CALCULATE(SELECTEDVALUE(Slicer[pp]))
VAR _pp = sumx(FILTER('Table','Table'[pp]<=_selectvalue),'Table'[pp])
RETURN _pp

To verfiy the result:

andhiii079845_1-1677678514712.png

 

Than use the measure as a filter:

andhiii079845_2-1677678554296.png

There has to be NO relationship between both tables.

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

Check out the February 2025 Power BI update to learn about new features.

Feb2025 NL Carousel

Fabric Community Update - February 2025

Find out what's new and trending in the Fabric community.