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.
I want to add a text measure to a table in Power BI that is based upon a simple star schema. One fact table, one dimension table.
I want the text measure to be "Pass" or "Fail". But before I can even make sure my code is correct to calculate the pass or fail, I am getting very strange behavior. I've built a simple Power BI file to demonstrate, but apparently can't attach it. It is so simple I will post screenshots to what I did.
I have a simple data model with a country table (fact table) and related continent table (dimension) with the population by country as the only built in measure.
I added a simple constant measure to the fact table: Constant Text Value = "FOOBAR"
And when I built a table and leave that constant text measure out, I get a summation of population and I get the expected Hemispheres. Looks good!
But when I bring in a constant text measure suddenly I see relationships that don't exist in the data. Asia isn't in the Southern Hemisphere (at least in my data)
Any ideas? I would expect the text measure to be evaluated per filter context in the table. But it seems to add filter contexts that don't exist in the data, and only display the sum of population for the relationships that do exist?
Huh? I'm stumped.
Thanks for any clue you could give!
-Jeff
In your Countries table, do you have Countries in it that don't have a population, but do have your FOOBAR text?
DAX is for Analysis. Power Query is for Data Modeling
Proud to be a Super User!
MCSA: BI ReportingNope. See below for all data.
I'm looking at this more today. It looks more and more like adding the constant text measure caused a cross join. *scratches head*
More information:
1) If you remove the attribute on the dimension table (Hemisphere) then the problem goes away.
2) The behavior is identical in Power Pivot.
I've found a work around - Filter "Population" for "is not blank".
Which works.... but I feel this represents something I fundamentally don't understand about Power BI.
DAX Studio can be used to capture queries, you may have a look.
https://msdn.microsoft.com/en-us/query-bi/dax/summarizecolumns-function-dax#return-value
You are suggesting to use a function that only returns a value on certain field groupings?
Thanks!
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 |
---|---|
112 | |
100 | |
76 | |
74 | |
49 |
User | Count |
---|---|
146 | |
108 | |
106 | |
90 | |
62 |