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
dcheng029
Helper I
Helper I

How to have calculated column measure only on one row?

Hi all,

 

I created a table where all 4 "Difference" columns are calculated columns from other data sources in my Power BI report.

 

I am wondering if these calculated column values can only be on row 2 and instead have row 1 as static numeric values?

 

I.e. the below yellow highlighted values on row 1 to be static "1", "2", "3" and "4" instead of the -114, -62, -40 and -18 values while row 2 remains unchanged.

dcheng029_0-1729227949020.png

 

The purpose of this is to create a line graph like the below. If there is a simplier way to generate this graph, any pointers are appreciated!

dcheng029_1-1729228149701.png

 

1 REPLY 1
quantumudit
Skilled Sharer
Skilled Sharer

Hi @dcheng029 

Providing more context around your query would be beneficial. For instance:

- Where do you wish to perform the calculation for static values? In PowerQuery or DAX?
- If using DAX, do you require separate calculated columns or measures?
- The provided visualization lacks labels, making it difficult to discern your intent.


The chart displays numbers such as +55, -20, which do not appear in the data screenshot you shared.

Without adequate context, the solutions offered by experts may not align with your needs.


Please supply a sample dataset, a screenshot, or examples of the desired labels (if it pertains to a visual, ensure it has proper labels).


Based on my understanding of your query, here is a solution:


Create a measure and utilize a conditional function like IF() or SWITCH(), setting a condition for when ID=1, then apply the constant values.

Best Regards,
Udit

If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudo 👍

🚀 Let's Connect: LinkedIn || YouTube || Medium || GitHub
Visit My Linktree: LinkTree

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!

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.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.