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

The FabCon + SQLCon recap series starts April 14th at 8am Pacific. If you’re tracking where AI is going inside Fabric, this first session is a can't miss. Register now

Reply
kevball2
New Member

Using filter or Calculate to find single value

Hi All, 

 

Trying to create a measured value from a csv file 

ProjectLicenseCount = CALCULATE(COUNT(LicenseSummary[Effective Quantity]), LicenseSummary[License Product Family] = "Project Professional ")

 

Trying to get the effective Quantity count for just the project Licenses but the measured value always comes back without and distinct values. There is only 1 row for project professional so there should be no issue with duplicates

 

is there an easier way to get this value? i want to add to as the max value filter for a Gauge Visual

 

I also tried a Lookupvalue with no luck 

 

ProjectLicenseCount = LOOKUPVALUE(LicenseSummary[Effective Quantity], [License Product Family], "Project Professional")

 

1 ACCEPTED SOLUTION
technolog
Super User
Super User

Your approach to get the "Effective Quantity" for a specific "License Product Family" using DAX in Power BI seems correct. However, there are a few things that could be causing the issue:

Data Issues: Before diving deep into formulas, always ensure the data quality. Check if there's any leading or trailing white space in the "License Product Family" column values or any hidden characters. Simple errors like this can cause formulas to not match values as expected.

Formula Issues:

a. CALCULATE function recalculates an expression over a given filter. It might not give the expected result if other hidden filters are in place. In Power BI, the default behavior is to apply filters from visuals, slicers, and other measures. To clear other filters, you can use the ALL function.

ProjectLicenseCount = CALCULATE(
COUNT(LicenseSummary[Effective Quantity]),
LicenseSummary[License Product Family] = "Project Professional",
ALL(LicenseSummary)
)

 

 


b. LOOKUPVALUE function returns a single value from a column by searching for it in another column. If there are multiple matching values, it can throw an error. It's best to use this function when you are certain there's only one match.


Visualization Filters: Ensure that there aren't any filters applied at the visual, page, or report level that might be altering your results.

Data Model Relationships: Ensure that the relationships in your data model are set up correctly. Incorrect relationships can lead to unexpected filter behavior.

View solution in original post

2 REPLIES 2
technolog
Super User
Super User

Your approach to get the "Effective Quantity" for a specific "License Product Family" using DAX in Power BI seems correct. However, there are a few things that could be causing the issue:

Data Issues: Before diving deep into formulas, always ensure the data quality. Check if there's any leading or trailing white space in the "License Product Family" column values or any hidden characters. Simple errors like this can cause formulas to not match values as expected.

Formula Issues:

a. CALCULATE function recalculates an expression over a given filter. It might not give the expected result if other hidden filters are in place. In Power BI, the default behavior is to apply filters from visuals, slicers, and other measures. To clear other filters, you can use the ALL function.

ProjectLicenseCount = CALCULATE(
COUNT(LicenseSummary[Effective Quantity]),
LicenseSummary[License Product Family] = "Project Professional",
ALL(LicenseSummary)
)

 

 


b. LOOKUPVALUE function returns a single value from a column by searching for it in another column. If there are multiple matching values, it can throw an error. It's best to use this function when you are certain there's only one match.


Visualization Filters: Ensure that there aren't any filters applied at the visual, page, or report level that might be altering your results.

Data Model Relationships: Ensure that the relationships in your data model are set up correctly. Incorrect relationships can lead to unexpected filter behavior.

Anonymous
Not applicable

Hi @kevball2

 

Can you share some data and sample output expected. Post it in OneDrive and provide the link

 

Cheers

 

CheenuSing

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.