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
Marcin
Helper V
Helper V

One number in measure vs filter context

Hi,

 

i would like to create measure like :

 

DIVIDE ( SUM(Sales1[Amount]) ;  SUM(Sales2[Amount])  ; 0 ) - 1 

 

But I have a problem with filter/row context when use this measure in table per time becasue of -1. 

 

How to resolve that t? 

 

 

5 REPLIES 5
v-danhe-msft
Employee
Employee

Hi @Marcin,

Based on my test, your formula could work on my side:

1.PNG

What is your desired result?

 

Regards,

Daniel He

Community Support Team _ Daniel He
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

HI @v-danhe-msft

 

The problem appears when the measure will be presented in time dimension :

 

Capture.PNG

 

 

Then I get all -1 vaules by all time day dimensions.

 

 

Omega
Impactful Individual
Impactful Individual

@Marcin 

 

It's either your totalsales is 0 at those dates, there is an issue in the formula TotalSales measure or the variance between TotalSales and TotalDiscount is very minimal (very close to zero). Try the below: 

 

  • Check the totalSales formula
  • Drag Date and TotalSales
  • Change Test Measure data type to percentage

Hi @Marcin,

I could not reproduce your problem, could you please share some sample data to have a test if possible?

 

Regards,

Daniel He

Community Support Team _ Daniel He
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Omega
Impactful Individual
Impactful Individual

Please share sample data with expected results. 

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.