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

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now

Reply
DavidB023
Helper III
Helper III

Variable Column

Hi everybody !

 

Here is my table : 

Capture.PNG

 I want to create a measure with another value named A  (which is constant) divide by my second column named B. In fact, I have a slicer with each dates but when I diselected my date, there is All. 

I want when All appear on my slicer, a measure with A divide by the last B here 615.

 

So I try : 

C = IF (
DISTINCTCOUNT ( 'Données'[Date] ) = 1;
SUM ( B);
Lastnonblank(B;"")
))

 

 

It worked but it divide A by 600 (november 2017), so strange..

Thanks

Best regards 

David

1 ACCEPTED SOLUTION
v-juanli-msft
Community Support
Community Support

Hi @DavidB023

I make a test with your data on my site.

Create measures

Measure = CALCULATE(LASTDATE(Sheet1[year]),ALL(Sheet1))
Measure 2 = CALCULATE(LASTNONBLANK(Sheet1[B],1),FILTER(ALL(Sheet1),[year]=[Measure]))
Measure 3 = DIVIDE(615,[Measure 2])

8.png

 

 

Best Regards

Maggie

View solution in original post

2 REPLIES 2
v-juanli-msft
Community Support
Community Support

Hi @DavidB023

I make a test with your data on my site.

Create measures

Measure = CALCULATE(LASTDATE(Sheet1[year]),ALL(Sheet1))
Measure 2 = CALCULATE(LASTNONBLANK(Sheet1[B],1),FILTER(ALL(Sheet1),[year]=[Measure]))
Measure 3 = DIVIDE(615,[Measure 2])

8.png

 

 

Best Regards

Maggie

Hi @v-juanli-msft,

Thanks a lot for your solution ! 

Finally I used your Measure and Measure2 and I inject in :

Measure3 = DIVIDE( A ;

IF( DISTINCTCOUNT ( 'Sheet1'[year] ) = 1 ;
B ; 
[Mesure2]
))

 

It works like I want, 

Thanks

Best regards

David

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.