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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
pstanek
Post Patron
Post Patron

Dax

Measure1  = Calculate(
SUM(movement[pcena]);
FILTER(movement; movement[date] >= NOW()-30 && movement[date] <= NOW()))

Measure2  = Calculate(
SUM(movement[pcena2]);
FILTER(movement; movement[date] >= NOW()-30 && movement[date] <= NOW()))

 

Measure3=IF([Measure1]<>0,[Measure1]/[Measure2],0).

 

Can you tell me, where is the mistake in syntax in Measure3.

measure 1 = CALCULATE(SUM(movement[date]); movement[date]>NOW()-30; movement[date] <= NOW()).

Can you tell me ,what the difference bettweenn Measure1 a measure 1 is?

 

Problem 2

I have two tables with relation in query.

A->B

Table A includes column Office and revenue.

Table B includes  column Office and parameter.

I want to create report Office Revenue/parameter . How will I create it in DAX.

 

I need this solve fast as I can.

1 ACCEPTED SOLUTION
Sean
Community Champion
Community Champion

@pstanek This should work for a Calculated Column in Table A

 

Column = TableA[Pcena] * RELATED ( TableB[Parameter_n] )

View solution in original post

6 REPLIES 6
Sean
Community Champion
Community Champion

@pstanek Besides that . at the end of Measure3 there's nothing wrong with that formula

 

The difference between Measure1 and measure 1 - is the evaluation context - best way to explain/show is with a picture

Measure1 is the way to go even tough you get the same overall result in the bottom Total Row

Dax.png

 

Go to the Relationship View => select Column Office in either table => drag and point to column Office in the other table

The relationship will be established

 

Hope this helps. Le me know...

Can you tell new, which one is faster? Measure1 , or measure1

 

I have data, where Measure 1 is too slow. Results are not often calculated. I can even tell, I am at BI mercy, If results appear, or not.

Measure 3 didn´t t work. Sometimes It writes something about function filter, that I can not be used in fuctions If and similar functions

 

I have already established relationship, but i don´t know How to create column in Table A .

Table a

Office1  goods1 Pcena1

Office1  goods2 Pcena2

Office2  goods1 Pcena3

 

Table B

Office_n parameter_n

Column should have values

Pcena*VLooklup(office_ n)

 

It means

Office1  goods1 Pcena1 Pcena1*VLooklup(office_ 1)

Office1  goods2 Pcena2 Pcena2*VLooklup(office_ 1)

Office2  goods1 Pcena3 Pcena3*VLooklup(office_ 2)

 

Vlookup will find parameterin Table B

Sean
Community Champion
Community Champion

@pstanek This should work for a Calculated Column in Table A

 

Column = TableA[Pcena] * RELATED ( TableB[Parameter_n] )

Thanks, I was stepping around.

 

Do you know some really good Dax library or books  for Power Bi. I mean, I would like to see not only codes, but with easy  examples.

Tables, what we want  to calculate., results

 

I always find code, tables - not described in detail where I can not say what It means. Result is that, I know function related, but I can not use it effectively.Cat Happy

Sean
Community Champion
Community Champion

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.