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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
jesau
Regular Visitor

Help with Measure

Hello all, Can you help me to find the error, the  measure below shows repeated values in the column which is wrong.
 
CAD_Over_GAP%_QYTD =
Var CAD_Sal_QYTD = [Sales_CAD_QYTD]
Var CAD_Bgt_QYTD = [Bgt_2025_CAD_QYTD]
Return
If(CAD_Bgt_QYTD = 0,
0,
Divide(CAD_Sal_QYTD,CAD_Bgt_QYTD,0)-1
)
 
Here is the results...resultado.png
 
Thanks in advance.
5 REPLIES 5
v-linhuizh-msft
Community Support
Community Support

Hi @jesau ,

 

Have you solved your problem? If it is solved, please share your solution and accept it as solution or mark the helpful replies, it will be helpful for other members of the community who have similar problems as yours to solve it faster. Thank you very much for your kind cooperation!

 

Best Regards,
Zhu

v-linhuizh-msft
Community Support
Community Support

Thanks for the replies from selimovd, sevenhills and powerbiexpert22.

 

Hi @jesau ,

 

Notice in the screenshot you provided that the values for Bgt_2025_CAD_QMo and Sales_CAD_QMo are the same as Bgt_2025_CAD_QYTD and Sales_CAD_QYTD, and that the CAD_Over_GAP%_QMo values are not duplicated, is there a difference between these measure? What are the expected results you need? Can you provide example data and expected results, or a .pbix file with sensitive data removed to better address your question?

 

Best Regards,
Zhu

 

If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly.

powerbiexpert22
Post Prodigy
Post Prodigy

Hi @jesau ,

please share power bi file with sample data

sevenhills
Super User
Super User

What result are you seeing?

Without data, it is hard to reply. Let us go iterative phased approach here:

 

-- Test 1, what data you see? is it same as other column! cool!

CAD_Over_GAP%_QYTD = [Sales_CAD_QYTD]
 
-- Test 2, what data you see? is it same as other column! cool! 
CAD_Over_GAP%_QYTD = [Bgt_2025_CAD_QYTD] 
 

-- Test 3, what data you see? Is the formula working per the data? 

CAD_Over_GAP%_QYTD = Divide([Sales_CAD_QYTD], [Bgt_2025_CAD_QYTD],0
 
Looks like you have calculated logic in the two measures you used and hard to reply, without knowing the details and data. 
 
 
selimovd
Super User
Super User

Hey @jesau ,

 

what did you expect?

Without more information we can't tell you why you get the result. The formula looks good from the syntax.

 

Best regards

Denis

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! Prices go up Feb. 11th.

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

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