Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Hello Power BI Friends,
here is an absolute Beginner, who needs some help.
I would be very thankful if someone could help me.
I need a function to use it as the title of a table.
I have a Table and a Slicer.
The Slicer is about the item-number and the table includes the components of the item.
I need a function so that as soon as I select an item-number in the slicer and the number of rows in the table changes, that the title of the table count and says "The item has __ components."
I already have a function, but it only shows me the total number of the table.
It does not react to the slicer. For Example:
"The item has "
&
COUNT(
'items'[item_id]
)
&
" components."
Is this even correct? I think I need to do it with SELECTEDVALUE() but I do not know myself so well with it yet.
And how can I still make use of a function that as soon as nothing is selected in the slicer, the title of the table says something like: "Please select an item-number first."
I've seen some videos on YouTube about this with IF() but I don't really understand it yet to be honest.
Maybe an experienced person can help me on the hint.
Thank you very much and have a nice weekend 🙂
Solved! Go to Solution.
Hi @PowerBI_Rookie ,
Please update the formula of measure as below, please find the details in the attachment.
Dynamic title =
IF (
ISFILTERED ( items[item_jd] ),
"The item has " & COUNT ( 'items'[item_jd] ) & " components.",
"Please select an item first."
)
If the above one can't help you, could you please provide more raw data in your tables (exclude sensitive data) with Text format and your expected result with backend logic and special examples? It would be helpful to find out the solution. You can refer the following links to share the required info:
How to provide sample data in the Power BI Forum
How to Get Your Question Answered Quickly
And It is better if you can share a simplified pbix file. You can refer the following link to upload the file to the community. Thank you.
How to upload PBI in Community
Best Regards
Hi @PowerBI_Rookie ,
Please update the formula of measure as below, please find the details in the attachment.
Dynamic title =
IF (
ISFILTERED ( items[item_jd] ),
"The item has " & COUNT ( 'items'[item_jd] ) & " components.",
"Please select an item first."
)
If the above one can't help you, could you please provide more raw data in your tables (exclude sensitive data) with Text format and your expected result with backend logic and special examples? It would be helpful to find out the solution. You can refer the following links to share the required info:
How to provide sample data in the Power BI Forum
How to Get Your Question Answered Quickly
And It is better if you can share a simplified pbix file. You can refer the following link to upload the file to the community. Thank you.
How to upload PBI in Community
Best Regards
create the measure
Thank you for your Replay sudhav!
Maybe I have expressed myself incorrectly.
I take the Oceania example (left).
I want the number of rows to be in the title.
In this case there are 13 rows to Oceania.
So the title should say something like: "There are 13 countries in Oceania".
Same in the Europe example (right): There are __ countries in Europe.
And if nothing is selected in the slicer (Reg_name), it should say: "Please select a region first".
But still i thank you for your help! 🙂
if it helps, accept it as solution
Thank you sudhav!
I have almost made it.
Could you please formulate the formula like this without the SELECTEDVALUE()?
So it all works, but in my case I don't want the value from the slicer to be in the title.
So exactly the same formula but the part with
& SELECTEDVALUE(Dim_reg[Reg_name])) - should not be used.
But as soon as I delete it, the alternative with "Please select a region first" doesn't work anymore. Do you have an alternative formula that is exactly the same (because it works for me) but without the SELECTEDVALUE() part?
in the measure you can use
User | Count |
---|---|
98 | |
87 | |
77 | |
67 | |
63 |
User | Count |
---|---|
110 | |
95 | |
95 | |
64 | |
58 |