Forum Discussion
hasonefilter power bi
- 4 years ago
Hello, thanks for answering.
I solved it in the following way.
I added the following to the function: &&HASONEFILTER(Calendar[Date].[Month])
It remained like this:
IF(HASONEFILTER('TableA'[Date].[Year])&& (HASONEFILTER('TableA'[Date].[Month]),SUM('TableA'[numbers]),BLANK())
I force the year and month segmentation buttons to be selected, if one is not selected, it does not show information.
- 4 years ago
Hello, thanks for replying.
Fix it as follows.
add the following to the function: &&HASONEFILTER(Calendar[Date].[ Month])
It looks like this:
IF(HASONEFILTER('Table'[date].[ Year])&& (HASONEFILTER('Tablea'[date].[ Month]),SUM('TableA'[numbers]),BLANK())
I force that the year and month segmentation buttons are selected, if any is not selected it does not show information.
better you create a new column year column and use that
Year = Year([Date])
then
measureName = IF(HASONEFILTER('TableA'[Year]),SUM('TableA'[numbers]),BLANK())
refer
https://powerpivotpro.com/2013/03/hasonevalue-vs-isfiltered-vs-hasonefilter/
- luisajara104 years agoFrequent Visitor
Hello, thanks for answering.
I solved it in the following way.
I added the following to the function: &&HASONEFILTER(Calendar[Date].[Month])
It remained like this:
IF(HASONEFILTER('TableA'[Date].[Year])&& (HASONEFILTER('TableA'[Date].[Month]),SUM('TableA'[numbers]),BLANK())
I force the year and month segmentation buttons to be selected, if one is not selected, it does not show information.