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.
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")
Solved! Go to Solution.
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.
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.
Hi @kevball2
Can you share some data and sample output expected. Post it in OneDrive and provide the link
Cheers
CheenuSing
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
47 | |
24 | |
20 | |
15 | |
13 |
User | Count |
---|---|
51 | |
46 | |
39 | |
19 | |
19 |