Forum Discussion
How to filter only specific column in table
- 5 years ago
Hi, Anonymous
Sorry that I did not clearly understand from the first time.
I hope this time I understood correctly.
The new link is down below.
Hour by Date V2 =CALCULATE (SUMX (Query1,Query1[Hours]),FILTER (Query1,SELECTEDVALUE ( 'Table'[ClientId] ) = Query1[ClientId]))Cost by Date V2 =CALCULATE (SUMX (Query1,Query1[CostValue]),FILTER (Query1,SELECTEDVALUE ( 'Table'[ClientId] ) = Query1[ClientId]))
Thank you for your help, really helpful for me. But, when for I drag a slicer with no value, the second table is empty. How can I keep the current value except 2 measures
can you download the file, I group by one more column.
https://drive.google.com/file/d/1X8oNoKc_fq_lpFkHeD4uxf-aZCS3zRki/view?usp=sharing
Thank you so much. Have a good day ahead
Hi, Anonymous
Thank you for your feedback.
I am not sure if I understand your question correctly.
I assume that your question is. if you select nothing in the bottom slicer, the up-table Avgcost / Avghour result is empty, right??
In this case, you have to change the measures. Because it depends on the selection from the slicer. If nothing is selected, then the calculation will be nothing.
I don't know very well about your data, but I am allowed to suggest, please try to create the dim-table for your slicer. And change the measures.
Please check the below link.
https://www.dropbox.com/s/qjrbzivuas1ef65/testdata.pbix?dl=0
- Anonymous5 years agoNot applicable
yah, thanks for your advice. Your file is an example right?
https://www.dropbox.com/s/qjrbzivuas1ef65/testdata.pbix?dl=0In my file, when I select seperate date, it works fine now. But if I select all of dates. The measures are empty. Do you know the issue, do I need to add any filter.
- Jihwan_Kim5 years agoSuper User
Hi, Anonymous
thank you for your feedback.I am not sure, but in my opinion, try to check what does "selectedvalue( )" bring you for the result.
It is a very useful function.
However, if there is more than one value selected, then the outcome is blank.
I saw in the measures that quite a lot of selectedvalue() are used.
So, if your slicer is selecting more than one, then the result is blank.
I hope it helped.
Adding a filter and write a measure simply is one way.
However, I am not sure if there are some reasons why you prefer not to connect the tables, and use selectedvalues()
- Anonymous5 years agoNot applicable
Thank so much for your information, I don't connect to table, because I want to show all the value even it's empty. 😞