Forum Discussion
Text Box Values not Recognizing Measures that Contain filters
I am trying to insert a text value into the text box and it is not picking up the measure when it contains filtering within the calculation.
This measure is recognized/picked up and generates the correct value.
The report page has a Period Actualized filter and is a summary with text boxes, and no visuals. Using the cards is not an option due to the custom formatting of the page and content.
The measure that is not working should generate the value: increased 12.6%
2 Replies
- DataNinja777
Super User
Hello Anonymous ,
In order to do the headcount calculation using Power BI, you need the following two tables in your data model.
- Employee table
- Calender table
The Employee table contains as a minimum 3 pieces of information below, but if you want to add a geographycal analysis, you can add that information such as USA, Canada etc in the employee table, too.
- Employee ID
- Hiring date
- Leaving date
Then you will have these two tables as "disconnected tables" in your data model and write a dax formula like below, in order to identify flexibly who are the employees still employed at any particular point in time.
After getting the flexible and versatile headcount measure working which respects time dimension, you can write a ConcatentateX measure to prepare the variance analysis commentary as you required. There's an article on how to prepare headcount analysis using Power BI in the link below:
https://p3adaptive.com/finding-the-magic-part-2-on-the-way-to-data-happiness/
Good luck!
- AnonymousNot applicable
Hi. My measure is fine and working when used in other visuals or cards. But its not accepting it in the text value. We build our time intelligence using the variables so none of our tables are connected to the date table. I have the concatenate set up as such:
VAR PercentChange = [_HC%ChangeYoY_USA]RETURNSWITCH( True (),PercentChange >= 0, "increased by " & CONCATENATE( ROUND( PercentChange * 100, 1), "%"),PercentChange < 0, "decreased by " & CONCATENATE( ROUND ( PercentChange * -100, 1), "%"),PercentChange = BLANK(), "<no change>",BLANK() )